WordPress.org

Ready to get started?Download WordPress

Forums

How to write a page that points to index.php (7 posts)

  1. kabeza
    Member
    Posted 7 years ago #

    Hi guys
    One theme I downloaded doesn't contain any link to go back to the index page

    Is there any way to add a page "Home" with any tag that generates a link to home (index.php ?)

    Thanks !

  2. Jeremy Clark
    Moderator
    Posted 7 years ago #

    I always use this
    <a href="<?php bloginfo('url'); ?>" title="Home">Home</a>

  3. kabeza
    Member
    Posted 7 years ago #

    jeremyclark13
    where do you put that code ? in which file ?

  4. Jeremy Clark
    Moderator
    Posted 7 years ago #

    It all depends on the theme. Which theme are you trying to use? If at all possible maybe give a link to the theme download so I can view the code.

  5. kabeza
    Member
    Posted 7 years ago #

    Hi Jeremy
    It is ocean-mist-10

    You can find it in the wordpress theme directory

  6. Jeremy Clark
    Moderator
    Posted 7 years ago #

    I found two ocean mists themes only one has the navigation bar so I'm guessing it's actually version 1.2. Anyway you'll need to add the code into your header.php file look for this code here.

    <?php wp_head(); ?>
    </head>
    <body>
    <div id="page">
      <div id="header">
        <h1><a href="<?php echo get_settings('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
        <div class="description"><?php bloginfo('description'); ?>&nbsp;</div>
        <div id="mainpic"></div>
    	<ul id="pagetabs">
    	  <?php wp_list_pages('title_li='); ?>
    	</ul>
      </div>

    Where you see this

    <ul id="pagetabs">
    	  <?php wp_list_pages('title_li='); ?>
    	</ul>

    Change it to this

    <ul id="pagetabs">
    	  <?php wp_list_pages('title_li='); ?>
    <a href="<?php bloginfo('url'); ?>" title="Home">Home</a>
    	</ul>

    That should be all you need.

  7. kabeza
    Member
    Posted 7 years ago #

    Thanks a lot jeremy
    That code worked PERFECT !!!

Topic Closed

This topic has been closed to new replies.

About this Topic