WordPress.org

Ready to get started?Download WordPress

Forums

Link to page in a different theme (7 posts)

  1. Jeff Starr
    Member
    Posted 8 years ago #

    How do I link to a page (e.g., archives.php) that is located within a theme other than the one currently being used?

    I would like to create a single generic 'archives' page and place it inside of one theme only, but link to it from all available themes, whether the user is using that theme or not. So that way, whenever a user clicks on the 'archives' link, it will take them to the 'archives' page that is located in a specific theme, regardless of the theme they are using.

    Perhaps an easier way to ask this question: Is there a way to indicate both "page id" AND "wp theme" within an internal wordpress link?

  2. devilmaycry
    Member
    Posted 8 years ago #

    You should be able to achieve this will conditional tags:

    http://codex.wordpress.org/Conditional_Tags

  3. moshu
    Member
    Posted 8 years ago #

    I don't think WP would recognize any template file (and archives.php is a template file!) outside of the theme system.

  4. Jeff Starr
    Member
    Posted 8 years ago #

    Actually, the page (call it unknown.php) isn't an archive page at all, I was just using that as an example. Further, the page (unknown.php) will in fact be located within a theme directory.

    To clarify, I am trying to link to 'unknown.php', which is located in some 'themeA' (for example), from several other themes. Thus, themeA, themeB, and themeC will all have links to the page 'unknown.php', which is located exclusively in themeA.

    How do I do that? I hope there is a way..

    (if you think conditional tags may work for this, then please, by all means provide an example;)

  5. moshu
    Member
    Posted 8 years ago #

    So what is this unknown.php? Not understanding what do you want to do makes quite difficult to figure out a solution. (Not that I am sure there is one...)
    A "theme" cannot have a link to anything - only certain files of a theme. I just mention this to show that vague theoretical questions get similar answers :)

  6. Jeff Starr
    Member
    Posted 8 years ago #

    Okay, one last try:

    How do I link from any page in themeA to a specific page in themeB?

    It doesn't get any clearer than that.

    Nonetheless, in case that is still too abstract:

    How do I link from my sidebar in theme 'Taco' to my bio page in theme 'Cracker'? (just an example)

  7. moshu
    Member
    Posted 8 years ago #

    Sidebar is a template file (sidebar.php). "bio" is not a template file.
    If you mean you want to link to a Page created via the admin > Write > Write Page interface... I don't see what the question is.

    Or,if "bio.php" is a physical file somewhere on your server (even in another theme) I don't know what do you expect to happen when linked to it.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags