This topic has 15 replies, 2 voices, and was last updated 10 years by Laura.

  • Author
  • #74062
     keithlewis
    Participant

    I want to make the read more button open the link in a new window for a section that contains kleo posts or a post grid.

    How can i make that happen.

    #74261
     Laura
    Moderator

    Hello, plese try adding this to functions.php of child theme

    COPY CODE
    
    //make more link open in new window
    function add_blank_to_link($link) {
    $pos = strpos($link, 'a href');
    if ($pos) {
    $link = substr_replace($link, 'a target="_blank" href', $pos, 6);
    }
    return $link;
    }
    add_filter('the_content_more_link', 'add_blank_to_link');
    
    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #74284
     keithlewis
    Participant

    I pasted in at the end of the functions.php file as per below:
    }
    add_action(“wp_ajax_kleo_lost_password”,”kleo_lost_password_ajax”);
    add_action(‘wp_ajax_nopriv_kleo_lost_password’, ‘kleo_lost_password_ajax’);

    //make more link open in new window
    function add_blank_to_link($link) {
    $pos = strpos($link, ‘a href’);
    if ($pos) {
    $link = substr_replace($link, ‘a target=”_blank” href’, $pos, 6);
    }
    return $link;
    }
    add_filter(‘the_content_more_link’, ‘add_blank_to_link’);
    // —————————————————————————–

    It still did not work – the code you gave me is before the very end of the functions.php file

    Am I missing anything from the code at the end ?

    Thank you

    #74793
     Laura
    Moderator

    Hello, can you share admin credentials? 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #74799
     keithlewis
    Participant

    http://punchme.beerpoint.us

    username: seventhqueen
    password: 123456@@!!

    I would like to have the kleo posts be able to open in new tab if i select that.

    #75131
     Laura
    Moderator

    Hello, it says invalid username, could you check it out again? 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #75227
     keithlewis
    Participant

    Sorry for some reason the user was not added – i have verified you can login with those credentials provided above.

    #75232
     keithlewis
    Participant

    Just also as another bug I find- i can create tabs perfectly but they do not appear side by side when viewing on a mobile device. they appear one below each other and do not appear to be responsive

    #75445
     Laura
    Moderator

    Hello, sidebars appear below eachother because it is responsive, if they were next to the content it would look very user unfriendly 🙁
    about the read more link, it should open in a new window now, i have added a plugin for that 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #75453
     keithlewis
    Participant

    go to punchme.beerpoint.us and you will see that the posts on the right column do not open in a new window. What plugin was installed?

    Also it is not sidebars – if you look at the edit page of the url above you will see i have tabs but they don’t appear correctly on mobile devices. The tab displays the first tab content then after you have seen all the content will show the next tab

    #75591
     Laura
    Moderator

    Hello, that requires a bit more of development so i suggest to hire a developer to do this for you 🙂

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #75595
     keithlewis
    Participant

    The kleo posts do not open a new window even after you made the changes.you can create a new page or add element and it still open in same window. What am I missing here

    #75597
     keithlewis
    Participant

    I created a brand new page: http://punchme.beerpoint.us/test-grid/

    I added kleo grid in to the page. The read more opens the same window instead of a new window.

    #75755
     Laura
    Moderator

    Hello, normal read more link of wordpress will open in a new window with the change i made, but the post grid element of visual composer doesnt get that, so that one doesnt open in a new window

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #75773
     keithlewis
    Participant

    How can me implement the change in visual composer to enable that function. It rally limits the functionality of those features.

    #75966
     Laura
    Moderator

    Hello, right now it is not avaible, maybe in the future it is.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
Viewing 16 posts - 1 through 16 (of 16 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?