• Hello,

    I need some suggestions on how I might be able to open the “Read more” link in post excerpts in a new tab. I’m using a query loop to populate a page, and within that query loop I have things like Post Title, Post Date, Post Excerpt, etc. What I’m trying to do is get the embedded “Read more” hyperlink to open in a new tab instead of just opening in the same window.

    If you view the link I’ve provided you’ll see the post excerpts and “Read more” part at the end that I’m referring to.

    Is there a way to do this without editing any of the PHP files? It seems like I cannot use CSS to accomplish this, correct? Also, I only want to do this for two specific pages, not across the board on all pages on the site.

    I hope my explanation of what I’m trying to accomplish is sufficient. Please let me know if you need any clarification at all. And most importantly, TIA for your help!!!

    • This topic was modified 2 years, 7 months ago by Jan Dembowski.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey @1ramyt
    Thanks for yr words!

    I believe there’s an explanation here that may help.

    Please let me know if it suits yr need ??

    Thread Starter 1ramyt

    (@1ramyt)

    Hi @iamarinoh thanks for that link!

    Unfortunately that solution does not work for me, as it’s not possible to edit the post excerpt block in HTML mode so that I can add in the target=”_blank” portion. The Gutenberg block system does not allow it.

    Are there any solutions to do so via CSS perhaps?

    This is what I’ve tried so far, and none of it is working:

    .page-id-35917, .read-more {
    		target: _blank;
    		target-name:new;
    		target-new:tab;
    }
    Thread Starter 1ramyt

    (@1ramyt)

    Oops, wrote the code incorrectly. This is what I’ve tried.

    .page-id-35917 .read-more {
    		target: _blank;
                    target: blank;
    		target-name:new;
    		target-new:tab;
    }

    I currently have “Read more” hidden, so you won’t see it, but I’d rather re-enable it and make it open in a different tab using CSS if that’s possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How Can I Open the “Read more” on Post Excerpt Blocks in a New Tab?’ is closed to new replies.