Support » Plugin: WP Show Posts » First “Read More” is heading to the homepage instead of the post

  • When I add a more-block to my posts, the “Read More” of first post that is displayed with WP Show posts is heading to the homepage instead of the page of the post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I found out, that after the call of ‘the_content(false, false)’ the get_permalink() function doesn’t work anymore, but only in the first run and if there is actually content.
    I fixed it by copying the permalink before that into the settings and in the functions.php I read the permalink from the settings instead with get_permalink()

    
    					<?php elseif ( ( 'full' == $settings[ 'content_type' ] || $more_tag ) && 'none' !== $settings[ 'content_type' ] ) : ?>
    						<div class="wp-show-posts-entry-content" itemprop="text">
    							<?php the_content( false, false ); ?>
    						</div><!-- .entry-content -->
    					<?php endif;
    

    I love this plug-in and I would like to continue to use it (alongside GeneratePress and other themes).
    It runs fine on two Dutch sites (one for more than 2 years) but shows exactly the above problem on an English language site. The WP show posts settings appear to be identical apart from the number of posts shown.
    All sites are on WordPress 5.4.1 and WP show posts 1.1.3.

    It doesn’t seem related to the More block. The issue is the following ‘empty link’ just after the header link to the post title.

    This doesn’t seem to do anything (shouldn’t) but it messes up the WP show posts block because of the 100% declarations. When I remove it in the code inspector (or set the percentages to 0), the remaining code works flawlessly.

    But when it’s in there, the inspector (various browsers Chrome, Firefox and Opera) shows that a link is active that reaches from the End of each title link and cuts across the excerpt text from the end of the post title. Does a process other than WP show posts injects this (can’t find it in the PHP).

    When you remove the title (checkbox ‘Include title’ under the Content tab in the WP show post definition), the problem obviously goes away. But I prefer showing my post headlines!!!

    An explanation of this ‘dead code’ and a fix or workaround would be most appreciated.

    It turned out to be an obscure theme issue, JS inserted filler that messed up this excellent plug-in but nothing else. Case closed!

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