• Resolved polak2

    (@polak2)


    I have a strange problem that I found by accident. On the blog that I create in the right sidebar there is a widget with the latest entries. Hovering the cursor over the title, e.g. “Czy potrzebujemy specjalisty?” returns a valid address, e.g. https://example.com/czy-potrzebujemy-specjalisty. Hovering the cursor over the image to the left of the title returns a link in the form – https://example.com/<?php the_permalink();?>. This is nowhere else. WordPress 5.4, Elegant Pink theme, with only “Yoast” and “Insert Headers and Footers” plugins.
    I have uploaded the screenshot here: https://ibb.co/CmjVzrq

    PS
    I’ve been looking for solutions, but they all concern the correct links, after which the click gives 404. Here is a kind of unpaired code, which should return the link for the picture as for the title. Of course I disabled all plugins. I even reinstalled them, but it was no use.

    • This topic was modified 4 years, 7 months ago by polak2. Reason: add link to the screenshot
    • This topic was modified 4 years, 7 months ago by polak2.
    • This topic was modified 4 years, 7 months ago by polak2.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter polak2

    (@polak2)

    I have resolved it on my own. Please update the file widget-recent-post.php and change below specified part:

    <?php                        
     if( has_post_thumbnail() && $show_thumb ){ 
         echo'<a href="<?php the_permalink();?>" class="post-thumbnail">';
             the_post_thumbnail( 'elegant-pink-post-thumb' );
         echo'</a>';
     }elseif( ! has_post_thumbnail() && $show_thumb ){ 
         echo'<a href="<?php the_permalink();?>" class="post-thumbnail">';
             elegant_pink_get_fallback_svg( 'elegant-pink-post-thumb' );
         echo'</a>';
     } ?>

    to this:

    <?php
     if( has_post_thumbnail() && $show_thumb ){ ?>
         <a href="<?php the_permalink();?>" class="post-thumbnail">
    	 <?php the_post_thumbnail( 'elegant-pink-post-thumb' ); ?>
         </a>
     <?php
     }elseif( ! has_post_thumbnail() && $show_thumb ){ ?>
         <a href="<?php the_permalink();?>" class="post-thumbnail">';
         <?php elegant_pink_get_fallback_svg( 'elegant-pink-post-thumb' ); ?>
     </a>
     <?php } ?>
    • This reply was modified 4 years, 7 months ago by polak2. Reason: fix formatting

    Hello @polak2,

    Thank you for letting us know about the issue.

    I have transferred this message to the team and will fix this on the next update release of the theme.

    If you have any further questions, please let me know.

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Right sidebar widget shows instead of the post url’ is closed to new replies.