Digital experiences for all disciplines
New Landing › How can we help? › Cardinal › Cardinal update has broken Header 4
New Landing › How can we help? › Cardinal › Cardinal update has broken Header 4
- This topic has 8 replies, 3 voices, and was last updated 9 years by
Kyle – SUPPORT.
-
Posted in: Cardinal
-
August 19, 2015 at 2:17 pm #205374
After the latest Cardinal update, the Header 4 still has a remanent from the previous config fields. You can see it on the header of our site.
It appears that the config option name settings were changed for the Top Bar Left (and Right) Config to using:
tb_right_text
and relatedSnippet of current options json:
"tb_left_config";s:4:"text";s:12:"tb_left_text";s:25:"Top Bar Left Config Field";s:15:"tb_right_config";s:0:"";s:13:"tb_right_text";s:0:"";s:13:"header_layout";s:8:"header-4";s:
It used to be
header_right_text
and relatedSnippet of old:
"header_left_config";s:0:"";s:16:"header_left_text";s:49:"Contact us at 212-555-1212 or [email protected]";s:19:"header_right_config";s:0:"";s:17:"header_right_text";s:49:"Contact us at 212-555-1212 or [email protected]";s:21:"c
I would guess there still parts of the old settings in the Header 4 code? Can you help me with this?
August 19, 2015 at 4:07 pm #205455I was confused. The swift variables are correct and have not changed, but the issue with Header 4 remains. You can still see it in the url.
I think it is in the function
sf_header_aux
which does not check to see if theheader_right_config
is not set totext
before adding theheader_right_text
.So that option for Header Right/Left Text Config can be set to nothing, but will still output the text in those headers that call it.
In the
sf_header_aux
function, you can change lines 215 and 237 to anelse if
:} else if ( $header_right_config == "text" ) { $header_right_output .= '<div class="text">' . do_shortcode( $header_right_text ) . '</div>' . "\n"; } return $header_right_output;
For now, I just removed the text in the
header_right_text
and so nothing is there any longer.August 19, 2015 at 5:02 pm #205475Hi there,
How did you update to the latest version? Checked here and not able to replicate locally. Do you have any child theme customisations?
– Ed
August 19, 2015 at 6:11 pm #205516Thanks for the response.
I do have child theme customizations but only adding category filtering functions to Ess Grids and Portfolios for the admin.
I’m not sure why it is appearing, but it is there.
I updated from the theme pages in wp-admin.
In Theme Options:
Select Header 4.
Select Text/Shortcode for Header Right Text
Add some text in field.I checked the Cardinal Options object, and the header_right_config shows “”, but since
sf-header.php
is called from header-4,header_right_text
gets populated.I should say that no other right elements are on, like social, search, etc.
I have the theme loaded in wpengine at the older version and with the same configuration, it does NOT show the
header_right_text
. Weird.Would it make sense to add the
else if
where I pointed out above?August 20, 2015 at 5:40 pm #205902Have you overridden any of the theme’s header output? The strange thing here is that header 4 doesn’t have a header right output – the cart/wishlist is there by default.
– Ed
August 20, 2015 at 6:04 pm #205909I have not overridden it.
Here is my
cardinal/template-parts/header/header-4.php
My line 14 shows that sf_header_aux( ‘right’ ) is being called, and with
header_right_config
set to “” I get theheader_right_text
<?php /* * * Header 4 * ------------------------------------------------ * Copyright Swift Ideas 2015 - http://www.swiftideas.com * * Output for header-4 * */ global $sf_options; $header_right_output = sf_header_aux( 'right' ); $fullwidth_header = $sf_options['fullwidth_header']; ?> <?php if ( $fullwidth_header ) { ?> <header id="header" class="sticky-header fw-header clearfix"> <?php } else { ?> <header id="header" class="sticky-header clearfix"> <?php } ?> <div class="container"> <div class="row"> <?php echo sf_logo( 'col-sm-4 logo-left' ); ?> <div class="header-right"> <?php echo $header_right_output; ?> </div> <?php echo sf_main_menu( 'main-navigation', 'float-2' ); ?> </div> <!-- CLOSE .row --> </div> <!-- CLOSE .container --> </header>
August 20, 2015 at 6:20 pm #205914Here is what header-4.php should be (and is exactly what it is in the latest update):
<?php /* * * Header 4 * ------------------------------------------------ * Copyright Swift Ideas 2015 - http://www.swiftideas.com * * Output for header-4 * */ global $sf_options; $fullwidth_header = $sf_options['fullwidth_header']; ?> <?php if ( $fullwidth_header ) { ?> <header id="header" class="sticky-header fw-header clearfix"> <?php } else { ?> <header id="header" class="sticky-header clearfix"> <?php } ?> <div class="container"> <div class="row"> <?php echo sf_logo( 'col-sm-4 logo-left' ); ?> <?php echo sf_main_menu( 'main-navigation', 'float-2' ); ?> </div> <!-- CLOSE .row --> </div> <!-- CLOSE .container --> </header>
– Ed
August 20, 2015 at 6:46 pm #205925Yikes! Thanks Ed. I wonder what other files are not in sync.
What would you suggest as the best method to update?
I used the WP Admin update, but obviously something did not work as expected.Just delete and reload from ThemeForest download?
Thanks, Mike
August 21, 2015 at 11:27 am #206121Updating through the admin should work fine, not sure what happened there
– Kyle
-
Posted in: Cardinal
You must be logged in and have valid license to reply to this topic.