• How can I add my own link to different pages under the pages section on the sidebar in the default theme, or more specifically I’m trying to add a link back to the home page. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • you can go into the sidebar, to where you want the link to show up, and put something like this:

    <a href="https://www.yoursite.com">Home</a>

    Thread Starter airogos

    (@airogos)

    I’ve ended up figuring out my problem, and am posting for future reference. The above code is what I basically did, but there’s more because I wanted this link to match the formatting of the other page lists. Since the wp_list_pages function is used, I just inserted my home page link above it and added the list formatting. The full code is:

    <li><h2>Pages</h2>
    <ul>
    <li><a href="https://www.joesflix.com">Main</a></li>
    <?php wp_list_pages('title_li='); ?>
    </ul>
    </li>

    Notice how the wp_list_pages is set to no heading, as I inserted it myself to squeeze in my link. Also, list_pages doesn’t need a
    <li> code, it has it built in.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Home Page Link’ is closed to new replies.