• Resolved Tuukka Virtaperko

    (@complex-buttons)


    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?

Viewing 4 replies - 1 through 4 (of 4 total)
  • “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.

    Thread Starter Tuukka Virtaperko

    (@complex-buttons)

    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 “https://localhost/wordpress/licence.txt” worked. (I’m using XAMPP to help develop a theme, as you probably can guess.)

    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 https://complexbuttons.com/ so you go to the Page/Post you want to link to e.g. https://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 https://complexbuttons.com/license for Page Links to

    Thread Starter Tuukka Virtaperko

    (@complex-buttons)

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to make Page Links To open page in #container?’ is closed to new replies.