Forum Replies Created
-
AuthorPosts
-
KyleMember
So this code is successful at hiding the primary navigation and showing the secondary navigation that I want on the one specific page.
The problem is that the code:
.page.page-id-501 #site-navigation
{
display: none;
}is not hiding the secondary navigation on all the remaining pages on our site. I could go in and add line of code for each page to hide the secondary menu but that is tedious and I don’t want to have to do that every time we add a new page
KyleMemberI did input that code and it hid the primary menu on the 1 page that I wanted to hide it on.
What I am trying to accomplish with this is the following:
-
I do not want to show the secondary menu on the rest of the site
I only want to show the secondary menu on one page where I am hiding the primary menu-
I have been able to hide the primary on that one page
Now I just need to show the secondary menu on just that one pageI hope that helps to better explain what I am trying to accomplish. I am close to that need, I just wasn’t sure what the display tag would be to show that secondary menu
KyleMemberThanks for the help on hiding the primary menu. Using the CSS, if I want to just show the secondary menu while the primary is hiding on that specific page, what would that display: ; code be?
KyleMemberThanks for the code. It successfully centered just the mobile header. I wasn’t able though to get the navigation arrows on the mobile menu to change the color. Take a look at the image to see the result I am trying to accomplish:
KyleMemberFANTASTIC! There must have been an error in copying the code over as it is working perfectly now. Thank you so much for you help on this!
KyleMemberVery odd things happening, I added the terminating syntax ; to the endif statement and now get the following error:
Parse error: syntax error, unexpected end of file in /homepages/40/d141091220/htdocs/clickandbuilds/ASUColoradoAlumni/wp-content/themes/wen-business-pro-child/functions.php on line 93
Here is the entirety of the functions.php child theme code:
<?php
add_action( ‘wp_enqueue_scripts’, ‘enqueue_child_theme_styles’, PHP_INT_Max);
function enqueue_child_theme_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri().’/style.css’ );
wp_enqueue_style( ‘child-style’, get_stylesheet_uri(), array(‘partent-style’) );
}‘/**
* Site branding
*
* @since WEN Business 1.0
*/
function wen_business_site_branding(){
?>
<div id=”site-navigation” role=”navigation”>
<?php
wp_nav_menu( array(
‘theme_location’ => ‘primary’ ,
‘container’ => ‘nav’ ,
‘container_class’ => ‘main-navigation’ ,
)
);
?>
</div><!– #site-navigation –>
<?php
}
/**
* Primary navigation
*
* @since WEN Business 1.0
*/
function wen_business_mobile_navigation(){
?>
<i class=”fa fa-bars”></i>
<div style=”display:none;”>
<div id=”mob-menu”>
<?php
wp_nav_menu( array(
‘theme_location’ => ‘primary’,
‘container’ => ”,
) );
?>
</div><!– #mob-menu –>
</div>
<?php
}
/**
* Header top content
*
* @since WEN Business 1.0
*/
function wen_business_header_top_content(){
$social_in_header = wen_business_get_option( ‘social_in_header’ );
$search_in_header = wen_business_get_option( ‘search_in_header’ );
?>
<?php if ( ( 1 == $social_in_header && wen_business_is_social_menu_active() ) || 1 == $search_in_header ): ?>
<div id=”header-top-content”>
<div class=”container”>
<div class=”site-branding”>
<h1 class=”site-title”>” rel=”home”>
<?php
$site_logo = wen_business_get_option( ‘site_logo’ );
?>
<?php if ( ! empty( $site_logo ) ): ?>
” alt=”<?php echo esc_attr( get_bloginfo( ‘name’ ) ); ?>” />
<?php else: ?>
<?php bloginfo( ‘name’ ); ?>
<?php endif ?>
</h1>
<?php
$show_tagline = wen_business_get_option( ‘show_tagline’ );
?>
<?php if ( 1 == $show_tagline ): ?>
<h2 class=”site-description”><?php bloginfo( ‘description’ ); ?></h2>
<?php endif ?>
</div><!– .site-branding –>
<div class=”header-top”>
<div class=”header-top-inner”>
<?php if ( 1 == $social_in_header ): ?>
<?php the_widget( ‘WEN_Business_Social_Widget’, array( ‘icon_size’ => ‘small’ ) ); ?>
<?php endif ?>
<?php if ( 1 == $search_in_header ): ?>
<div id=”header-search-form”>
<?php get_search_form(); ?>
</div><!– #header-search-form –>
<?php endif ?>
</div><!– .header-top-inner –>
</div><!– .header-top –>
</div><!– .container –>
</div><!– #header-top-content –>
<?php endif;
}’KyleMemberWhen I past the functions.php code in below I get the following error message:
Parse error: syntax error, unexpected end of file in /homepages/40/d141091220/htdocs/clickandbuilds/ASUColoradoAlumni/wp-content/themes/wen-business-pro-child/functions.php on line 92
line 91 and 92 on the functions.php file are:
<?php endif
}’KyleMemberThanks for the coding to help make that happen! Unfortunately i’m having issues implementing it due to issues with the child theme. Here is what I have in the Child Theme:
style.css
/*
Theme Name: WEN Business Pro Child Theme
Theme URI: http://wenthemes.com/item/wordpress-themes/wen-business/
Author: SageMedia, LLC
Author URI: http://wenthemes.com/
Description: Child theme for WEN Business Pro theme
Version: 1.0.5
License: GNU General Public License, version 3 (GPLv3)
License URI: http://www.gnu.org/licenses/gpl-3.0.txt
Tags: light, white, blue, one-column, two-columns, left-sidebar, right-sidebar, fixed-layout, custom-background, custom-colors, custom-header, custom-menu, editor-style, featured-images, full-width-template, post-formats, sticky-post, translation-ready, responsive-layout, theme-options, threaded-comments
Text Domain: wen-business
Template: wen-business-pro
*//* =Child Theme Custom CSS
————————————————————– *//** functions.php ———– */
<?php
/**
* Child Theme functions and definitions
*
*//**
* Loading Parent theme stylesheet
*
*/
add_action( ‘wp_enqueue_scripts’, ‘catchbox_child_enqueue_styles’ );
function catchbox_child_enqueue_styles() {
wp_enqueue_style( ‘catchbox-parent-style’, get_template_directory_uri() . ‘/style.css’ );
} -
AuthorPosts