• Good day guys
    Please I am building a Web and I will like all my post to open in a new tab. I have already tried to added the target=_blank” but it’s not working
    I am using code light theme

    Can someone please help

Viewing 7 replies - 1 through 7 (of 7 total)
  • What’s the URL of your site?

    If you’re using target=_blank" like you wrote in this post, note that you’re missing a double quote.

    It should be target="_blank"

    Thread Starter bhydemi

    (@bhydemi)

    Yes that’s a typo right here… I used target=”_blank” and it didn’t work. Here’s my website https://www.daymab.com

    Heres the php

    id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <header class=”entry-header”>
    <?php the_title( sprintf( ‘<h2 class=”entry-title”><“href=”%s”” rel=”bookmark”>’, esc_url( get_permalink() ) ), ‘</h2>’ );?>

    Try this

    <?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" target="_blank" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' );?>

    Thread Starter bhydemi

    (@bhydemi)

    @pre_pragan I have tried it, it’s still not working

    Hi @bhydemi

    Please make sure that you are editing the right page, have you tried adding class or any other attributes to permalink, is it working?

    If possible please share theme name as well.

    Thanks

    Thread Starter bhydemi

    (@bhydemi)

    Codilight lite

    Thread Starter bhydemi

    (@bhydemi)

    @codemovement I haven’t tried adding any class…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I want all my post to open in a new tab’ is closed to new replies.