-
AuthorPosts
-
February 18, 2014 at 11:04 pm #225796
I know of a site that uses Enfold and has a stock quote in the header (non-fixed header with social icons and additional navigation), and they’re doing so via a WP plug-in. I desire to do virtually the same thing, and I’ve installed an appropriate plug-in that gives me the shortcode to use. However, my insertion of the shortcode in the “Phone Number or small info text” field was met with no success. How can I accomplish this?
(The site referenced that has the content already is http://www.breitlingenergy.com.)
- This topic was modified 10 years, 7 months ago by njsanders1.
February 19, 2014 at 12:33 am #225832Hey Nick!
They have added in that div container to the header.php file and then probably used do_shortcode or added in the php call from the plugin/raw code.
Best regards,
DevinFebruary 19, 2014 at 2:17 am #225892So, for a non-programming-guy like me (hence my decision to use WordPress), what’s the easiest way to recreate that outcome? What code would I need to put in the header.php file?
I’m assuming the syntax to use do_shortcode is”
echo do_shortcode('[whatever_my_shortcode_is]');
But how do I put a div in the header?
February 19, 2014 at 7:39 am #225977Hey!
You can edit header.php, find this code on line 92:
<div id='header_meta' class='container_wrap container_wrap_meta'> <div class='container'>
Create a new div below then use the do_shortcode function. Referring to the site, maybe you add something like this:
<div class="stockQuote"> <?php echo do_shortcode('[whatever_my_shortcode_is]'); ?> </div>
Cheers!
IsmaelJanuary 28, 2017 at 6:40 am #739683Hi,
I solved my problem with “Code Block” component. Check “Deactivate schema.org markup” option.
Example code here:
<div style="padding-bottom:10px;color:#ffffff;font-size:40px;" class="av-special-heading av-special-heading-h1 custom-color-heading blockquote modern-quote avia-builder-el-6 el_before_av_textblock avia-builder-el-first av-inherit-size"> <h1 class="av-special-heading-tag" itemprop="headline"> [post_title] </h1> </div>
Hope this helps.
- This reply was modified 7 years, 8 months ago by hayatbiralem.
January 28, 2017 at 7:26 am #739692I found another solutions but we need some hack for that.
Go to
enfold\config-templatebuilder\avia-shortcodes\heading.php
Find
if($heading)
Replace:
if( empty($heading) && ! empty($content) ) { $heading = do_shortcode($content); } if($heading)
And use “Text Block” component with this shortcodes:
[av_heading tag='h1' padding='10' heading='' color='custom-color-heading' style='blockquote modern-quote' custom_font='#ffffff' size='40' subheading_active='' subheading_size='30' custom_class=''][post_title][/av_heading]
If the enfold team will use the heading value as content in the future, rather than as an attribute, we can also use the custom heading component directly like this:
[post_title]
January 28, 2017 at 7:30 am #739693Sorry! My last two comments belongs to this topic:
https://kriesi.at/support/topic/custom-shortcode-in-special-headingheading-text/Very sorry.
February 1, 2017 at 8:04 am #741054 -
AuthorPosts
- The topic ‘How can I add shortcode content to the header?’ is closed to new replies.