Join the Soledad Facebook Users Group here
for Share, assistance, discussion, and Updates related to Soledad WordPress Theme.

If you can't create a new ticket - you can send us an email via our contact form and we will get back to you.

Okay
  Public Ticket #3034069
Subtitle has post excerpt
Closed

Comments

  •   PhilDufour started the conversation
  •  2,610
    PenciDesign replied

    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.



  • PhilDufour replied

    That´s nice present ;)

    Thank you.

  • PhilDufour replied

    I 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,610
    PenciDesign replied

    Hi,

    I've edited your site.

    Please check.

    Regards,
    PenciDesign.


  • PhilDufour replied

    Thanks.

    No more error, that´s great.

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

  •  2,610
    PenciDesign replied

    Hi,

    I've added more code to the snippet.

    Please check.

    Regards,
    PenciDesign.


  • PhilDufour replied

    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?

  •  2,610
    PenciDesign replied

    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

    Thank you.

  • PhilDufour replied

    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 ?

  •  2,610
    PenciDesign replied

    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

    Big thank you !