• Resolved husk3r

    (@husk3r)


    hi, i have an sticky post and I want to disable the excerpt only only in that post and keep the posts below with the excerpt, so that i can use some shortcodes in the sticky post, currently the shortcodes are not showing up because of the excerpt.
    is that possible?

Viewing 3 replies - 1 through 3 (of 3 total)
  • try using the conditional tag is_sticky() to construct a conditional statement;

    for example, change the code in your theme’s index template (or whatever template parts might get called from that), from:

    <?php the_excerpt(); ?>

    to:

    <?php if( is_sticky() ) {
      the_content();
    } else {
      the_excerpt();
    } ?>

    what to change exectly where in which file depends on your currently used theme.

    Thread Starter husk3r

    (@husk3r)

    I did exactly as you suggested, found only one <?php the_excerpt(); ?> in a php file, Ive replaced it by
    <?php if( is_sticky() ) {
    the_content();
    } else {
    the_excerpt();
    } ?

    but still shows the excerpt in the sticky post

    Thread Starter husk3r

    (@husk3r)

    I did it , i was looking in the wrong file, Ive got the content.php and change it exactly as you suggested and it works now , thank you very much.
    my theme is Cicero from MH Themes.

    It is solved now, thank you alchymyth

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Disable excerpt in sticky post’ is closed to new replies.