We're merging with GenerateBlocks! Learn more here.

[Resolved] Read More button displays on all posts

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Read More button displays on all posts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #29785
    Mike
    Participant

    If I add the Read More text to a WP Show Posts query under Content settings, the Read More button displays on every post in that query, including those that have no <!–more–> tag. How do I configure WP Show Posts to only display the Read More button on posts that have the <!–more–> tag?

    #29824
    elvin
    Moderator

    Hi there,

    Can you try Tom’s provided PHP snippet here?
    https://wpshowposts.com/support/topic/read-more-only-if-theres-a-more-block/#post-23649

    Let us know how it goes.

    #29844
    Mike
    Participant

    I added the snippet to the GP child theme’s functions.php. The Read more button still appears at the end of posts when there’s no <!–more–> tag. I tried updating WP Show Posts to Version 1.2.0-alpha.3 but it made no difference.

    This is the snippet I used.

    add_filter( 'wpsp_content_more_link', '__return_null' );

    #29846
    Mike
    Participant

    Update: I updated to the WP Show Posts Alpha 1.2.0-alpha.3 version and saw no change in the display of the Read More buttons. I did notice that the theme’s Read more text was also displayed in posts with the <!–more–> tag. Next, I removed the Read More text from the WP Show Post list under Content. The Read more button is now gone, and posts with the <!–more–> tag display the theme’s Read more text in the correct place.

    Thanks for your help!

    Mike

    #29859
    elvin
    Moderator

    Nice one. Glad you got it sorted. 😀

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.