Skip to:
Content
Pages
Categories
Search
Top
Bottom

New custom page – how to make it look lige the other pages?


  • Kenneth Jensen
    Participant

    @kennethj

    Hi there

    I have a custom login page for my users, and everything tehcnically works fine. Now I want to include my header and footer, making the page nice and shiny like the rest of my pages (which I created in the admin interface).

    How do I do? I tried with just get_footer() and get_header() but I keep getting this error: Fatal error: Call to undefined function get_header() in /var/www/www.soldaterliv.com/www/wp-content/themes/soldaterliv-mainframe/rpx.php on line 1

    As far as I can understand, you should put something in functions.php but im not sure how. Please note that the page is located in my child theme called soldaterliv-mainframe in /www/wp-content/themes/

    Any help? Thx!

Viewing 3 replies - 1 through 3 (of 3 total)

  • Xevo
    Participant

    @xevo

    Make a page in the back-end admin area, make a custom wordpress page, by adding a comment with the template name in the top (https://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates). After throwing this file inside your themes folder, you get a dropdown on the right side of your page editings page, select the file and you can use normal tags like get_header(); in the php file of the custom page template.

    This is the only correct way to make a custom wordpress page as far as I know.


    Kenneth Jensen
    Participant

    @kennethj

    Thanks, but thats not what I want. Let me try again.

    I have a page called rpx.php. This page is hardcoded by me, containing some custom login scripts.

    My problem is that this page does not get the style from my theme. How do I apply it?


    modemlooper
    Moderator

    @modemlooper

    You need to do what Xevo said. upload this page to your wp-content/themes/whatever theme

    Add a new page in the WP admin. When creating page in the right side bar choose rpx page as page template.

    <?php
    /*
    Template Name: rpx page
    */
    ?>

    <?php get_header() ?>

    <div id="content">
    <div class="padder">

    PUT YOUR CUSTOM CODE HERE

    </div><!-- .padder -->
    </div><!-- #content -->

    <?php locate_template( array( 'sidebar.php' ), true ) ?>

    <?php get_footer(); ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘New custom page – how to make it look lige the other pages?’ is closed to new replies.
Skip to toolbar