• Resolved ws180

    (@ws180)


    I know you have answered this before but I don’t understand how to implement the answer.

    I want to display the entire excerpt in my slider without the “Continue Reading” link. You mentioned that you can use the “promoslider_content” hook, as well as remove “Continue Reading” through WordPress’s ‘excerpt more’ filter.

    I’m pretty new to this… I would be so grateful if you could please explain specifically how to do this?

    Thank you so much!

    http://wordpress.org/extend/plugins/promotion-slider/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Micah Wood

    (@woodent)

    To display the excerpt in your slider, you need only to check off the option to display it in the plugin settings page.

    To remove the link only for the slider, place this code at the end of your active theme’s functions.php file:

    add_filter( 'excerpt_more', 'remove_promo_slider_excerpt_link' );
    
    function remove_promo_slider_excerpt_link( $more ) {
        if( 'ps_promotion' == get_post_type() ) {
            $more = '';
        }
        return $more;
    }
    Thread Starter ws180

    (@ws180)

    I just tried that but nothing changed. I don’t know php at all…so just to make sure I added it correctly, I added it at the very end, before the ?>. Is this correct?

    add_filter( ‘excerpt_more’, ‘remove_promo_slider_excerpt_link’ );

    function remove_promo_slider_excerpt_link( $more ) {
    if( ‘ps_promotion’ == get_post_type() ) {
    $more = ”;
    }
    return $more;
    }
    ?>

    Here is the link to my page:
    http://emergecelebrant.com/home_test/

    You can see the “Read more” is still there and the content isn’t showing completely. Thank you so much for helping me with this.

    Plugin Author Micah Wood

    (@woodent)

    @ws180,

    Yes. That should be correct. Actually, there probably shouldn’t be a?> at all, but it isn’t hurting anything.

    It appears as though the link you sent is to a page that isn’t publicly published.

    Have you made sure that you added the code to your active theme’s functions.php file? If you aren’t careful, it is easy to add the code to the wrong file.

    Thread Starter ws180

    (@ws180)

    I made the page public so I hope you can view it now.

    http://emergecelebrant.com/home_test/

    Still not working. 🙁

    Thanks again for your help.

    Plugin Author Micah Wood

    (@woodent)

    Now it looks like you have a fatal error due to redeclaring the above function.

    Thread Starter ws180

    (@ws180)

    You’re right! Just removed it. You can at least view the page now.
    http://emergecelebrant.com/home_test/

    Plugin Author Micah Wood

    (@woodent)

    It is possible that your theme is also filtering the same thing at a later time. You can alter the code I gave you above to include the 99 as shown below:

    add_filter( 'excerpt_more', 'remove_promo_slider_excerpt_link', 99 );
    
    function remove_promo_slider_excerpt_link( $more ) {
        global $post;
        if( 'ps_promotion' == $post->post_type ) {
            $more = '';
        }
        return $more;
    }

    This will ensure that the code is run last and does what you want. Of course, it could be something else altogether. If so, I am afraid it would be hard to diagnose without actual access to the site.

    I also used another method to do the same thing in the function above. Perhaps that would make a difference for some reason.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Plugin: Promotion Slider] Display Full Excerpt’ is closed to new replies.