Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #908645
    Tegan Jones
    Participant

    Hello,

    I would like to remove the logo and menus from this single page:

    http://www.classact.com.au/winterstale

    So it can be a standalone page.

    Also if I am able to change the background colour for just this page too?

    Thanks,
    Tegan

    #908716
    Rahul
    Moderator

    Hi there,

    Thank you for writing in!

    1. Yes, you could use β€œBlank – No Container | No header, Footer” template under your page’s Page Attribute section.
    2. To change the background of that particular page, add the following custom css under Customizer > custom CSS

    .page-id-888  {
        background-color: #HEXCODE;
    }

    Note: Kindly replace the page id with your own.

    Hope that helps.

    Thanks

    #910112
    Tegan Jones
    Participant

    Great thank you very much for helping me!

    I am now wondering whether it is possible to have a different menu for this page (and potentially others) that I wish to not be associated with the rest of the website?

    Cheers!

    #910346
    Lely
    Moderator

    Hi There,

    You’re welcome.

    To achieve different menu on this page:http://www.classact.com.au/winterstale, please add the following code instead in functions.php file on your child theme:

    add_filter( 'wp_nav_menu_args', 'custom_menu' );
    
    function custom_menu( $args ) {
      if ( is_page('244') ) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'NewMenu';
      }
      return $args;
    }

    Then on Appearance > Menu: create a menu name NewMenu. Or you may change this to your preferred name.
    To add this same menu on other pages, please change this line:
    if ( is_page('244') ) {
    To this:
    if ( is_page(‘244’) || is_page(‘255’) ) {
    Note to change 255 to your corresponding page ID.

    Hope this helps.

    #910453
    Tegan Jones
    Participant

    Thank you kindly!

    I have tried to do this but it still does not work πŸ™

    #910672
    Christopher
    Moderator

    Hi there,

    The code is correct and it should work.
    Would you please provide us with login and FTP credentials so we can take a closer look.

    Thanks.

    #978279
    Tegan Jones
    Participant

    Thanks I have gotten it to work for one page

    add_filter( 'wp_nav_menu_args', 'custom_menu' );
    
    function custom_menu( $args ) {
      if ( is_page('244') ) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'NewMenu';
      }
      return $args;
    }

    I want to have multiple pages with this particular menu – so can i replace with this:

    add_filter( 'wp_nav_menu_args', 'custom_menu' );
    
    function custom_menu( $args ) {
    if ( is_page(β€˜244’) || is_page(β€˜298’) || is_page(β€˜304’) || is_page(β€˜380’) || is_page(β€˜390’) || is_page(β€˜393’) || is_page(β€˜395’) || is_page(β€˜397’) || is_page(β€˜399’) || is_page(β€˜402’) || is_page(β€˜404’) || is_page(β€˜406’) || is_page(β€˜408’) || is_page(β€˜410’) || is_page(β€˜412’) || is_page(β€˜414’) || is_page(β€˜416’) || is_page(β€˜418’) || is_page(β€˜420’) || is_page(β€˜422’) || is_page(β€˜424’)) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'NewMenu';
      }
      return $args;
    }

    I’ve replaced the multiple page one in my file manager but how do I “refresh” to check that it is working?

    Thanks!

    #978492
    Lely
    Moderator

    Hi There,

    Please use this code instead:

    add_filter( 'wp_nav_menu_args', 'custom_menu' );
    
    function custom_menu( $args ) {
    if ( is_page('244') || is_page('298') || is_page('304') || is_page('380') || is_page('390') || is_page('393') || is_page('395') || is_page('397') || is_page('399') || is_page('402') || is_page('404') || is_page('406') || is_page('408') || is_page('410') || is_page('412') || is_page('414') || is_page('416') || is_page('418') || is_page('420') || is_page('422') || is_page('424')) {
        $args['theme_location'] = 'primary';
        $args['menu'] = 'NewMenu';
      }
      return $args;
    }
    

    I’ve changed pretty quotes to normal quotes. That should work now.

    Hope this helps.

  • <script> jQuery(function($){ $("#no-reply-908645 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>