[resolved] Custom page (8 posts)

  1. makapa
    Posted 3 years ago #


    I need your help creating a custom page template with just the left sidebar (the secondary menu & primary sidebar) and the content. Since it's a standalone custom page I won't be needing to make a child theme.

    Can you help me? A hint or some other materials to read would be helpful also.

    What I already did.
    Because I'm a beginner I started reading the codex section for making a custom page and then proceeded: I took the Full Width template page/php file included in the theme but when I edited the file and included a div area with the left sidebar it actually reverted to a default page - thus including the right sidebar as well. I tinkered with code to the best of my close-to-0 abilities but did not manage to make it work.


  2. mybdbis
    Posted 3 years ago #

    Still you need to create the Child Theme.


  3. makapa
    Posted 3 years ago #

    You're right.

    I'll put some hours tomorrow in it and make it work. I'll comeback to mark the topic as resolved after I'll solve it.


  4. makapa
    Posted 3 years ago #


    Still haven't solved it.

    What I did (maybe I missed something)
    1. Did a child theme
    2. Made the template page (situated in the child theme folder)
    3. Made a functions file in the child theme folder with a function that has a simple if: if page template = mine then disable right sidebar

    The function I used is an edited copy of the function from the parent theme that removes the sidebars if the template is a full width page.

    Any help is appreciated. 10x

  5. makapa
    Posted 3 years ago #

    Solved it. Forgot to add the filter in child's function.php

    Thanks mybdbis for the help.

  6. mybdbis
    Posted 3 years ago #

    Its you who actually solve the problem, and glad you make it.

    All the best!!

  7. makapa
    Posted 2 years ago #


    after I created the page template I added this function in my functions.php (file in the child theme)

    add_filter( 'sidebars_widgets', 'oxygen_disable_sidebar_right' );
    function oxygen_disable_sidebar_right( $sidebars_widgets ) {
    	global $wp_query;
    	    if ( is_page_template( 'page-template-produse.php') ) {
    		   	$sidebars_widgets['secondary'] = false;
    	return $sidebars_widgets;
    	add_action( 'sidebar_widgets', 'oxygen_disable_sidebar_right', 11 );
  8. gabrielsolomon7
    Posted 2 years ago #


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic