Skip to content
Public Ticket #20902

Subtitle has post excerpt

Conversation thread

PhilDufour replied

Customer Reply

Big thank you !

PenciDesign Supporter replied

Staff Reply

Hi,

Please go to Appearance → Customize → Custom CSS then add the following custom CSS code:

.pcsl-inner .pcsl-pexcerpt .penci-psub-title {
    font-weight: 400;
    font-style: normal;
}
.pcsl-inner .pcsl-pexcerpt .penci-psub-title:hover {
    color: #000;
}

Regards,
PenciDesign.



PhilDufour replied

Customer Reply

One more time thank you for the support.

What should i add to the css to change the font type (size, bold or not) for the snippet and to keep having the color changing  on "OVER" the title ?

PhilDufour replied

Customer Reply

Thank you.

PenciDesign Supporter replied

Staff Reply

Hi,

The subtitle will also hide when you've turned off the post excerpt. If you want to hide the post excerpt, please use the CSS code below:

.pcsl-inner .pcsl-pexcerpt p {
    display: none;
}

Regards,
PenciDesign.

PhilDufour replied

Customer Reply

Thanks.

Works fine.

The only thing is that if i turn OFF the excerpt in the penci widget option, it turn also OFF the subtitle.

Can we have the excerpt turn OFF and the subtitle option ON?

PenciDesign Supporter replied

Staff Reply

Hi,

I've added more code to the snippet.

Please check.

Regards,
PenciDesign.


PhilDufour replied

Customer Reply

Thanks.

No more error, that´s great.

But still not "working" with your code for the subtitle. I´m missing something for sure

PenciDesign Supporter replied

Staff Reply

Hi,

I've edited your site.

Please check.

Regards,
PenciDesign.


PhilDufour replied

Customer Reply

I get a n message saying : "There has been a critical error on this website." when i activate the Snippet with your code.

PhilDufour replied

Customer Reply

That´s nice present ;)

Thank you.

PenciDesign Supporter replied

Staff Reply

Hi,

Please install the Code Snippet plugin, then create a new snippet with the following content:

add_filter( 'get_the_excerpt', function($post_excerpt, $post) {
    $sub_title_content = '';
    $sub_title = get_post_meta( $post->ID, 'penci_post_sub_title', true );     if ( $sub_title ) {
        $sub_title_content = '<h4 class="penci-psub-title"></h4>';
    }     return $sub_title_content.$post_excerpt; } );

Regards,
PenciDesign.



Want to join this conversation or access attachments? Sign in first.