WordPress.org

Ready to get started?Download WordPress

Forums

Page Name as Link (7 posts)

  1. WPers
    Member
    Posted 6 years ago #

    Dear All

    When we write a post, then the post title automatically be a link. But when we create/write a page, that page title is NOT automatically be a link.

    I've writed/created two pages, called "Contact" and "Webmail" and that each title is automatically appear on the top menu !..

    So, wanna know how to make "Contact" and "Webmail" be a link really like the post title.

    Thanks

  2. peiqinglong
    Member
    Posted 6 years ago #

    You have to go into the index.php theme file and copy and paste the h2 code with link over to page.php.

  3. WPers
    Member
    Posted 6 years ago #

    Thanks for your reply. But can you explain to me more detail, sorry beacuse i'm newbie. I used GlossyBlue theme.

  4. WPers
    Member
    Posted 6 years ago #

    when i used code below, the page title is still can't be a link :(

    <h2> <a href="http://myblog.com/?page_id=115"></a></h2>

    when using code below the page title still can't be a link and break my theme/page :(

    <h2><a href="http://myblog.com/?page_id=115">"><?php the_title(); ?></a></h2>

    So please give me help

  5. peiqinglong
    Member
    Posted 6 years ago #

    I don't know what the GlossyBlue theme is, but all themes are roughly setup the same way:

    <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>

    That should do it.

  6. WPers
    Member
    Posted 6 years ago #

    yup, you absolutely right ! but every time i tried, above code break the page that i've created :(

    what i want is just convert the page title (on the top menu) be link really like the post title. but onece again, above code is can't do what i want !

    so, perhaps there's another code? i used wp 2.2.2

  7. shelikesrain
    Member
    Posted 6 years ago #

    Hey WPers, try this:

    Go to Options -> Permalinks -> Select Numeric -> Update

    Your links should look something like: http://yourdomain.com/index.php/page_title

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.