• I have used some little scraps of code found on the support forums to make sure all links posted in a post link to _blank, but this also makes anything that i cut under “READ MORE” open in a new page. I would like to keep links posted in the blog opening a new page but the READ MORE function to link to _self..

    Anybody know how to go about this?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Well, if you’re using the “more” quicktag, you could try opening wp-includes/js/quicktags.js, and edit in the target you want.

    Thread Starter menwuur

    (@menwuur)

    Yes, i am using the “more” quicktag, but am confused as to where to insert the target i want in the js, (im not too familiar with javascript)

    edButtons[edButtons.length] =
    new edButton('ed_more'
    ,'more'
    ,'<!--more-->'
    ,''
    ,'t'
    ,-1
    );
    /*
    edButtons[edButtons.length] =
    new edButton('ed_next'
    ,'page'
    ,'<!--nextpage-->'
    ,''
    ,'p'
    ,-1
    );
    */
    function edLink() {
    this.display = '';
    this.URL = '';
    this.newWin = 0;
    }

    any help?

    Hmmm. Having never used the “more” tag myself, and equally having never looked at the quicktag for same, I didn’t realize it was ref’ing something in core. And I’m not really sure where it’s located…. functions-formatting or something maybe? But you don’t really want to edit core anyway, since it will always get overwritten when you upgrade wp.

    So – hmmm. I’m rather at a loss now….

    wp-includes/template-functions-post.php in the line 92

    Change

    $output .= ' <a href="'. get_permalink() . "#more-$id">$more_link_text</a>";

    to

    $output .= ' <a href="'. get_permalink() . "#more-$id" target="_self">$more_link_text</a>";

    Does this work?

    No, your code-posting skills don’t work ??
    Use the backticks + read the instructions below…

    Even if it does, it’s still core, and it’s still going to get overwritten whenever you upgrade wp….

    hmmm i can’t post the code. ?? Where is the instruction?

    Below the post screen: Allowed markup: a blockquote br code em strong ul ol li.
    Put code in between backticks.

    If you’re using an English keyboard, the backtick character is under the tilde key, to the left of the numeral 1 key.

    phew, it was so confusing. I actually typed the words backticks lol. And placed the code between them. Thats was so funnnnyy.

    Heh…. well, some of the stuff around here is definitely neither transparent, nor user friendly.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘How to link READ MORE to _self’ is closed to new replies.