Custom CSS and target=”_blank” attribute overwritten by pagination

Posted in: Newspaper
Post count: 21

Hi there,

I’m using the “Page Links To” plugin to redirect some custom post types (created with ACF) to external sources. I also set Rank Math to automatically add the target=”_blank” attribute for external links to open them in a new tab.

Some of these posts don’t have links to external sources, but are left to open on the single post page directly on the site, so they are internal.

Using the TagDiv Module feature, I created a custom display for the specific post type (“Business”). Within it, I’ve added the “Module Read More Button” element and some custom CSS to display this button only for internally redirecting businesses:
https://prnt.sc/2t_nfnymDpep

CSS code used:
.tdb_module_read_more a[target="_blank"] {
display: none;
}

Everything is working properly until it comes to using any of the “Next Prev”, “Load More” or “Infinite Load” pagination:

This doesn’t happen with the “Normal Numbered” pagination type, but that’s only available for the “Flex Loop Builder” element. If I want to use the “Flex Block Builder” (in order to filter the custom posts based on multiple terms), that pagination type is no longer available, so having to use one of the other three, causes the problem described.

I would really appreciate your support in solving this issue!

Thank you in advance!

Post count: 27744

Hello,

Please try to use this code .tdb_module_read_more a:not([href*="okanaganfamilyfun"]) {
display: none;
}

Set your website there.

Thank you!

Post count: 21

Hi Anamaria,

Thank you for your reply!
Also, thank you for the solution you provided. It works great!

Thanks again for your support!

Post count: 27744

Hello,

I’m glad.

Have a great day!

Viewing 4 posts - 1 through 4 (of 4 total)
The forum ‘Newspaper’ is closed to new topics and replies.