“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.
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.)
Could you give me an example of an address that points to the URL of a page within my WordPress installation?
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
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.
- The topic ‘How to make Page Links To open page in #container?’ is closed to new replies.