Comments PhilDufour started the conversation 2,610PenciDesign repliedApril 29, 2022 at 8:09amHi,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.1 LikePhilDufour repliedApril 29, 2022 at 10:59amThat´s nice present ;)Thank you.PhilDufour repliedApril 29, 2022 at 11:07amI get a n message saying : "There has been a critical error on this website." when i activate the Snippet with your code. PenciDesign replied privately PhilDufour replied privately 2,610PenciDesign repliedApril 29, 2022 at 11:21amHi,I've edited your site.Please check.Regards,PenciDesign.PhilDufour repliedApril 29, 2022 at 11:25amThanks.No more error, that´s great.But still not "working" with your code for the subtitle. I´m missing something for sure 2,610PenciDesign repliedApril 29, 2022 at 12:24pmHi,I've added more code to the snippet.Please check.Regards,PenciDesign.1 LikePhilDufour repliedApril 29, 2022 at 12:35pmThanks. 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? 2,610PenciDesign repliedApril 29, 2022 at 12:43pmHi,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.1 LikePhilDufour repliedApril 29, 2022 at 12:46pmThank you.PhilDufour repliedApril 30, 2022 at 9:34amOne 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 ? 2,610PenciDesign repliedApril 30, 2022 at 9:44amHi,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.1 LikePhilDufour repliedApril 30, 2022 at 9:46amBig thank you ! Sign in to reply ...
Hi,
Please install the Code Snippet plugin, then create a new snippet with the following content:
Regards,
PenciDesign.
That´s nice present ;)
Thank you.
I get a n message saying : "There has been a critical error on this website." when i activate the Snippet with your code.
Hi,
I've edited your site.
Please check.
Regards,
PenciDesign.
Thanks.
No more error, that´s great.
But still not "working" with your code for the subtitle. I´m missing something for sure
Hi,
I've added more code to the snippet.
Please check.
Regards,
PenciDesign.
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?
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:
Regards,
PenciDesign.
Thank you.
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 ?
Hi,
Please go to Appearance → Customize → Custom CSS then add the following custom CSS code:
Regards,
PenciDesign.
Big thank you !