• Hi..I cannot figure out how (or if there is a plugin to do this) to link to a page dynamically..
    I currently have the site on a test server with a test domain and I don’t want to create all my pages with hardcoded links to the test domain…I want to be able to transfer it over to the live domain without having to reedit all my links.

    I am currently using FCK editor and I don’t see how to do it with that.
    If I enter: index.php/page-name it just comes up as this:
    http://index.php/page-name

    Any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • http://index.php/page-name/
    That does not make sense.
    Did you mean
    http://mysite.com/page-name/subpage-name/
    whereas the root would be your index page
    http://mysite.com/
    and any page created afterwards that was not a subpage of that would show like this
    http://mysite.com/page-name/

    Instructions
    First: Log in and go to the settings section.
    Seccond: Click on the Permalinks section
    Third: Select Custom Structure and copy /%postname%/ into the input field
    Fourth: Save`

    If you are using Manage -> Links to link to your pages, then the http:// is automatically added. I wish that there was a way to stop this, but I haven’t found it.

    If you are adding the links to your theme files, then you can use wp_list_pages or:

    <a href="<?php bloginfo('url'); ?>/page-name/">My Page</a>

    Both of these will still work if the domain is changed.

    Hi all…

    Just wondered if anyone had made any progress on this?

    I too want to be able to make links relative to the root, but plan on moving to the live domain soon…

    ../ or simply / doesn’t work because as previously said, WP adds http://

    Cheers for any help

    /Doug

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘link to page dynamically or relative to root’ is closed to new replies.