Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi bsl64
    You need to create a new page in your theme directory… (this is the simplest way to add a new Page Template) Then add the following code to the top of the page… followed by the rest of the code to run your content… Remember to change “Template Name” to whatever you want the template to be called ?? – then in the page admin change the template from default to your custom one…

    <?php 
    
    	/*
    		Template Name: Template Name
    	*/
    
    ?>
    Thread Starter bsl64

    (@bsl64)

    I uploaded this new page to the themes main directory. I hope that was correct.

    I did as you said and it did show up as a template I can choose from. However, even though I removed:

    <?php get_sidebar();?>

    out of the code the sidebar still shows up.

    Any thoughts on this?

    Thread Starter bsl64

    (@bsl64)

    It worked as you can see here:

    https://howtoearnmoney101.com/rapid-join-now/

    it removed the sidebar content but it still is not full width. I will have to try to figure out how to get rid of the actual sidebar background.

    https://codex.www.ads-software.com/Pages#Page_Templates

    removing ‘get_sidebar()’ from the page tempalte is only step 1;
    second step is to adapt the stylesheet to stretch the content over the full width; to do this for just the one page you will need to have a unique css selector somewhere in the new template, for instance in this area the newly added css class .singlecolumn:

    <div class="twocolumns singlecolumn">
    
    	<div id="content">

    then use that for styling by adding this to style.css:

    .singlecolumn #content { width:100%; }
    (plus possibly some more to adapt the background and the tables)

    and change the width on the table you have in the content.

    if you have problems implementing this, please paste the full code of the new page tempalte into a https://pastebin.com/ and post the link to it here – see https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    you have a div with an class of twocolumns – change it to full-width then create the class .full-width in your CSS file and give it the full width dimensions of the page and whatever other styles are relevant (remember to take into consideration the other relevant styles i.e. padding, etc) when setting the width).

    Thread Starter bsl64

    (@bsl64)

    Thank you for the help!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Add Page Template’ is closed to new replies.