Support » Themes and Templates » Two part question .htaccess and Back to Top

  • I need to make an .htaccess file in my wp-admin folder. What do I need to add and how do I do that? I’m a newbie with that one.

    And how do I add a “Back to Top” link at the bottom of my posts? In my homepage I have 8 posts. I want to add a Back to top link next to where it says the comment number.. Is that possible?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Check out

    Basically you’re making a file named .htaccess – it’s just like any other file.

    As for Back to Top, it’s twofold.

    1. use an empty, named anchor somewhere near the top of the page (<a name="top"></a>)
    2. Make a link at the bottom of your post: <a href="#top">Back to Top</a>

    Ok I’ll look into that .htaccess link later tonight.

    And as for the top deal. Is there a way to make it an automatic feature? I think that was too much to ask 🙂 But thanks for you time and answers!

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Automatic …. Sure, just put it in your template.

    Put <a name="top"></a> in your header.php (right after the name of your blog should work).

    For your front page, edit your index.php and add <a href="#top">Back to Top</a> to the Loop section.

    <?php if(is_home()){bloginfo('name');} else {} ?><?php wp_title(); ?><a name="top"></a>


    <div class="entry-content">
      <?php the_content('Continue Reading »'); ?>
      <?php wp_link_pages(); ?>
      <p class="postmetadata"><?php comments_number('No Comments', '1 Comment', '% Comments'); ?> | <?php the_tags( '&nbsp;' . __( 'Tags ' ) . ' ', ', ', '|'); ?> <a href="#top">Back to Top</a> | <?php edit_post_link(__('Edit'), '', ' |'); ?>

    The only reason I DON’T suggest actually using the top link as a link is that… well, a name will format that header as a link, and generally I don’t want it to do that.

    Perfect! I’ll do that! Thanks 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Two part question .htaccess and Back to Top’ is closed to new replies.