Forums

Wp list pages - change URL (5 posts)

  1. apertureboy
    Member
    Posted 3 years ago #

    Hi,

    I am using

    <?php
    if (is_home()) {$pg_li .="current_page_item";} ?>
    <?php wp_list_pages('title_li='); ?>

    yo display my nav and it works fine. But due to the client insisting upon a splash page, the actual home page needs to be http://www.site.com/home/

    Is there any way to change the URL of the homepage to point to http://www.site.com/home/ rather than http://www.site.com I want to use wp_list_pages for the nav highlighting.

    Thanks

  2. Samuel B
    moderator
    Posted 3 years ago #

    You can create a "home" page and make it your static front page.
    admin - "Settings" - "Reading"

    or
    http://codex.wordpress.org/Moving_WordPress#Moving_WordPress_Within_Your_Site

  3. apertureboy
    Member
    Posted 3 years ago #

    hey

    yes, I have a page called home set to static in settings - reading. And the code I mentioned above works fine for the navigation. But, the link to the homepage is http://www.site.com, as it should be normally. As I said, my client wants a splash page for some reason - a page that is only seen when you first visit the site. I simply created index.html - so this loads when you first visit the site. Then you click to enter the site, where the navigation is. So, the top navigation has home - about us - etc... this home button links back to index.html and I want it to link to http://www.site.com/home/ which is the static home page. But I cant find a way to change the url using

    <?php
    if (is_home()) {$pg_li .="current_page_item";} ?>
    <?php wp_list_pages('title_li='); ?>

    to change the home link to /home/ anyone try to do this b4?

    Thx

  4. Technokinetics
    Member
    Posted 3 years ago #

    This might do what you want:

    Create a Page called Splash Page, and set it as your home page in the WP dashboard. This will be at http://www.site.com/.

    Create another page called "Home". This will be at http://www.site.com/home/.

    Exclude your Splash Page from your main navigation using wp_list_pages('title_li=&exclude=1'), but replacing 1 with your Splash Page's ID.

    Tim

  5. apertureboy
    Member
    Posted 3 years ago #

    Yes, that does sound like it might work. Ill give it a try. Never thought of that.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.