WordPress.org

Forums

Link open in index (14 posts)

  1. niola
    Member
    Posted 10 years ago #

    Hi all.

    On my sidebar I have a link which is a "page link" and I want it to open in the index, how do I do that?

    Thanks a bunch!

  2. Avenir
    Member
    Posted 10 years ago #

    I think you'll need to be a little more precise. What do you mean by "page link"? Do you mean a link to a Page you created with WordPress' Page feature? What do you mean by "open in the index"? Do you mean open in the same window? Could you give us a link so we can see what happens with the link currently?

  3. niola
    Member
    Posted 10 years ago #

    Thanks for you reply :) I'll be more specific, sorry. You can have a look here: http://www.matthewperry.nl/blog

    In the sidebar there's a "link me" section, I've a made a link for "more" and "apply" (I created a page for both links with the wordpress feature) when you click on them they open in a new window. I want them to open where the index is now. Like with iframes you say "target="index" for example. Is this possible??

    I hope I explained it better this time :)

  4. niola
    Member
    Posted 10 years ago #

    Sorry bumping :s Can anyone help me??

    xx

  5. CanuckKev
    Member
    Posted 10 years ago #

    Your code for the More link has a Target="left" in it. Get rid of that first.

  6. niola
    Member
    Posted 10 years ago #

    Ohhh sweet that worked like a charm, I always think to difficult :s

    Another thing:
    Is it possible to link the "home button" back to the index??

    Thanks again!

  7. moshu
    Member
    Posted 10 years ago #

    yep, put there something like this
    <a href="<?php bloginfo('url'); ?>">Home</a>

  8. niola
    Member
    Posted 10 years ago #

    I get what you mean, but I made the "button" by creating a page, so it's showing in the "navigation" thing at the top (couldnt find any other to do that :s). I linked it to a page template I made myself as you can see. But how do I set my template to show the blog (home)? Or is there a better way to do this??

    xx

  9. moshu
    Member
    Posted 10 years ago #

    You don't need any "page" to bring you back to the home=index.
    In that navigation thingy instead of page_id etc. use the code I gave you above.
    Or is that "navigation" created by the page_list?

  10. niola
    Member
    Posted 10 years ago #

    Yes the "navigation"is created by "wp_list_pages". That okay or is there a better way to do this? And create a "home" (index) button thing :)

  11. niola
    Member
    Posted 10 years ago #

    Bump bump bump...

  12. moshu
    Member
    Posted 10 years ago #

    Well, I don't really see how a "home" link could be implemented in the list generated by the wp_list_pages tag. Maybe you should drop that page, since clicking on the header title anyway bring the visitor back to the "home" (=index.php) page.
    Another solution could be to implement an external horizontal menu which can be customized manually. (I just did it in my Dark Maple theme).

  13. Minna
    Member
    Posted 10 years ago #

    You'd need to put something like this to include the link Home at the top of the page listing:
    <ul>
    <li><a href="#">Home</a></li>
    <?php wp_list_pages('title_li='); ?></ul>

    "more" on this here

  14. niola
    Member
    Posted 10 years ago #

    Great :D that worked for me!!!

    Big thanks to the both of you :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.