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

    Thanks!

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

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Check out http://www.freewebmasterhelp.com/tutorials/htaccess/1

    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>
    Thread Starter homerm06

    (@homerm06)

    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)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    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.

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

    index.php

    <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'), '', ' |'); ?>
    </div>

    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.

    Thread Starter homerm06

    (@homerm06)

    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.