WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to make Page Links To open page in #container? (5 posts)

  1. Tuukka Virtaperko
    Member
    Posted 4 years ago #

    I need to make the Page Links To plugin open a page in the #container, so that my sidebar and header stay visible. But instead it removes them. How do I retain them?

  2. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    "But instead it removes them."
    Page links to opens up to any URL you point to. If you point to the URL of the page within your WordPress installation, the page rendered should have the header and sidebar if you have those in your layout.

  3. Tuukka Virtaperko
    Member
    Posted 4 years ago #

    That sounds good in theory, but I don't understand how it is done in practice. Could you give me an example of an address that points to the URL of a page within my WordPress installation? I tried to link to license.txt in the root of my WordPress installation, but it didn't work. Neither "licence.txt" nor "http://localhost/wordpress/licence.txt" worked. (I'm using XAMPP to help develop a theme, as you probably can guess.)

  4. @mercime
    Volunteer Moderator
    Posted 4 years ago #

    Could you give me an example of an address that points to the URL of a page within my WordPress installation?

    e.g. your site URL is http://complexbuttons.com/ so you go to the Page/Post you want to link to e.g. http://complexbuttons.com/contact-us
    You copy the URL of your Contact Us page and paste it

    If you point to your site's license.txt then you cannot expect the header, sidebar nor footer because license.txt is a text file and will render as such online. You can always copy content of license.txt and paste it into a Page or Post in your site, e.g. into Page titled "License", and you use the URL http://complexbuttons.com/license for Page Links to

  5. Tuukka Virtaperko
    Member
    Posted 3 years ago #

    Fixed this by learning to use page templates. Simply put

    <?php
    /*
    Template Name: Donate-Contact
    */
    ?>

    in the beginning of the php file and you can publish the content as a page, but so that you have chosen the template name Donate-Contact from the page menu. If you don't want the page to be listed as a page in the page list, use exclude.

    <?php wp_list_pages('exclude=15,20&depth=3&title_li=<h2>Sivut</h2>'); ?>

    This code lists pages but excludes pages with the ID (or something like that) 15 and 20.

Topic Closed

This topic has been closed to new replies.

About this Topic