WordPress.org

Support

Support » How-To and Troubleshooting » How to write a page that points to index.php

How to write a page that points to index.php

  • 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 !

Viewing 6 replies - 1 through 6 (of 6 total)
  • Jeremy Clark

    @jeremyclark13

    Member

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

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

    Jeremy Clark

    @jeremyclark13

    Member

    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.

    Hi Jeremy
    It is ocean-mist-10

    You can find it in the wordpress theme directory

    Jeremy Clark

    @jeremyclark13

    Member

    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.

    Thanks a lot jeremy
    That code worked PERFECT !!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to write a page that points to index.php’ is closed to new replies.
Skip to toolbar