Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Display shortcode next to logo
New Landing › How can we help? › Themeforest Theme Support › Dante › Display shortcode next to logo
- This topic has 8 replies, 2 voices, and was last updated 10 years by Mohammad – SUPPORT.
-
Posted in: Dante
-
June 1, 2014 at 12:27 am #79256
I’m trying to add a short code next to the logo. I’ve been successful in displaying it on the site but it is above the logo. Here’s the code that I added to the header.php child theme file:
<?php echo do_shortcode( '[shortcode]' ) ?>
Here is where it’s located in the header.php file:
<div id="header-section" class="<?php echo $header_layout; ?> <?php echo $logo_class; ?>"> <?php echo do_shortcode( '[shortcode]' ) ?> <?php echo sf_header($header_layout); ?> </div>
How can make the short code appear in the row div next to the logo instead of outside the div?
Thanks!
June 1, 2014 at 5:43 pm #79354I don’t mean to be rude but is there anyone that could help with this?
June 2, 2014 at 10:05 am #79471Hi,
If you provide specific page url so i can debug to fix the issue very soon .
Thanks ๐
With Best Regards
Swift IdeasJune 2, 2014 at 3:32 pm #79585Unfortunately the site is still on my local machine for now. Here is a screenshot of the actual placement:
https://www.dropbox.com/s/20043dhz8qepgl4/actual_placement.pngHere is the desired placement (I just used FireBug to move the div inside the logo div):
https://www.dropbox.com/s/zkc3molrjq6giqv/desired_placement.pngHope that helps.
Thanks!June 2, 2014 at 3:47 pm #79591Hi,
Please put this code at functions.php of child theme :function sf_logo($logo_class) { //VARIABLES global $woocommerce; $options = get_option('sf_dante_options'); $show_cart = $options['show_cart']; $logo = $retina_logo = ""; if (isset($options['logo_upload'])) { $logo = $options['logo_upload']; } if (isset($options['retina_logo_upload'])) { $retina_logo = $options['retina_logo_upload']; } if ($retina_logo == "") { $retina_logo = $logo; } $logo_output = ""; $logo_alt = get_bloginfo( 'name' ); $logo_link_url = home_url(); // LOGO OUTPUT $logo_output .= '<div id="logo" class="'.$logo_class.' clearfix">'. "\n"; $logo_output .= '<div class="issuem_title" >'.do_shortcode( '[issuem_issue_title]' ).'</div>'."\n"; $logo_output .= '<a href="'.$logo_link_url.'">'. "\n"; if ($logo != "") { $logo_output .= '<img class="standard" src="'.$logo.'" alt="'.$logo_alt.'" />'. "\n"; } else { $logo_output .= '<h1 class="standard">'.$logo_alt.'</h1>'. "\n"; } if ($retina_logo != "") { $logo_output .= '<img class="retina" src="'.$retina_logo.'" alt="'.$logo_alt.'" />'. "\n"; } else { $logo_output .= '<h1 class="retina">'.$logo_alt.'</h1>'. "\n"; } $logo_output .= '</a>'. "\n"; $logo_output .= '<a href="#" class="visible-sm visible-xs mobile-menu-show"><i class="ss-rows"></i></a>'. "\n"; if ($show_cart && $woocommerce != "") { $logo_output .= '<a href="'.$woocommerce->cart->get_cart_url().'" class="visible-sm visible-xs mobile-cart-link"><i class="ss-cart"></i></a>'. "\n"; } $logo_output .= '</div>'. "\n"; // LOGO RETURN return $logo_output; }
Hope that will place it correct position.
Thanks ๐
With Best Regards
Swift IdeasJune 2, 2014 at 4:55 pm #79618The “Vitae- Winter 2013” is outputted through the plugin shortcode referenced above (<?php echo do_shortcode( ‘[shortcode]’ ) ?>) and it isn’t static text. The idea here is as you click to view the previous issues of the magazine, that line changes to display the magazine issue that is being browsed. For example if you select “Summer 2013”, it will display “Summer 2013” not “Winter 2013”.
If I replace:
$logo_output .= '<div class="issuem_title" >Vitae - Winter 2013</div>'. "\n";
with:
$logo_output .= '<div class="issuem_title" > <?php echo do_shortcode( '[issuem_issue_title]' ) ?> </div>'. "\n";
Then it breaks the site.Thank you for your continuos help and support.
June 2, 2014 at 5:26 pm #79625Hi,
I have corrected code at http://support.swiftideas.net/forums/topic/display-shortcode-next-to-logo/#post-79591 so use that.Thanks ๐
With Best Regards
Swift IdeasJune 2, 2014 at 5:32 pm #79629That worked! Thank you so much for your help and great support.
June 2, 2014 at 5:36 pm #79633Hi,
You most welcome . I’m glad that issue resolved .
Thanks ๐
With Best Regards
Swift Ideas -
Posted in: Dante
You must be logged in and have valid license to reply to this topic.