(Pro) Recent Posts element in Header on Post Index page breaks permalink

Hi guys!

I’ve made a header that contains a global block with a Recent Posts element, which is used as a header for the Posts Index (Blog) page. Doing so breaks the permalink of the Recent Post…

I’ve tested the global block on a different page. This works.
I’ve tested the header with the global block on a different page. This works.
Only when I use the header on the Posts Index page (Page displaying latest posts), does the permalink of the post break.

Link in secure note :slight_smile:

Your help is appreciated!

Hey Meng,

I tested the setup you’ve described in my site and the Classic Recent Post element placed in a Global Block then placed in the Header works so this issue could be a result of customization or a custom plugin or script.

Please check for the following first:

  1. Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

  2. Switch to the parent theme.

If those don’t help, please give us WordPress Admin access in a Secure Note so we could check your setup.

Thanks.

1 Like

Thanks for checking. If it’s not reproducible I assume it’s something in this specific site messing with the object. I’ll investigate it a bit further, cheers!

Edit: found the culprit. Turns out a bit of code was aimed at enveloping every posts ‘article’ element with an anchor tag. Which doubles over the Recent Posts-element’s (already present) anchor tag, rendering it undefined. Thanks again! :slight_smile:

You’re welcome, Meng. And, we’re glad that you’ve found the cause of the issue. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.