Tagged: x
-
AuthorPosts
-
May 2, 2016 at 1:49 am #908645
Tegan JonesParticipantHello,
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,
TeganMay 2, 2016 at 3:01 am #908716
RahulModeratorHi 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
May 2, 2016 at 10:28 pm #910112
Tegan JonesParticipantGreat 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!
May 3, 2016 at 2:58 am #910346
LelyModeratorHi 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.
May 3, 2016 at 5:11 am #910453
Tegan JonesParticipantThank you kindly!
I have tried to do this but it still does not work π
May 3, 2016 at 8:08 am #910672
ChristopherModeratorHi 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.
May 6, 2016 at 2:24 am #978279
Tegan JonesParticipantThanks 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!
May 6, 2016 at 7:08 am #978492
LelyModeratorHi 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.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-908645 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
