Community Forums › Forums › Archived Forums › General Discussion › Visual Composer shortcodes in Genesis Hooks not working
- This topic has 10 replies, 2 voices, and was last updated 11 years, 10 months ago by
report.
-
AuthorPosts
-
October 21, 2014 at 9:40 am #128649
report
MemberHello,
I am trying to put a Visual Composer shortcode in the genesis_after_header hook but - despite 2Enable shortcode in this hook" is activated, the shortcode does not work.Any idea about that?
Thank you.
October 21, 2014 at 9:44 am #128651Brad Dalton
ParticipantOctober 21, 2014 at 10:32 am #128665report
MemberRight, thank you braddlaton. I tried it but nothing changes. This is the effect I get.
This is my Visual Composer shortcode:
[vc_row][vc_column width="1/3"][vc_column_text] ... all the rest of the shortcode + HTML code ... [/vc_row]
What I get is the HTML content IN the shortcode, but WITHOUT the effect of the shortcode.
In the example above, the shortcode should produce three 1/3 columns with HTML content in them.
The result is the correct HTML code without the shortcode effect, and in this case it is the three 1/3 sections.
BUT... if i enter just [vc_row][/vc_row] in the page or post content, say at the beginning of the text, the shortcode is correctly activated.
This shortcode generates this html code:
<div class="vc_row wpb_row vc_row-fluid"></div>
So strange, isnt'it?
October 21, 2014 at 11:32 am #128671Brad Dalton
ParticipantOctober 22, 2014 at 12:39 am #128715report
MemberAs I have done in other themes where Visual Composer is integrated, i am trying to put a row of three links (in the form of buttons) below the main menu.
This row of buttons is located below the main menu, in the genesis_after_header hook, and is supposed to appear in any page.
The advantage of making it with VC is that the line of buttons is resizable and responsive.
October 22, 2014 at 12:45 am #128716Brad Dalton
ParticipantOctober 22, 2014 at 12:46 am #128717October 22, 2014 at 12:49 am #128718report
MemberI also tried using the echo do_shortcode('[.........'); function and entering the code in the .php template instead of in the hook, but nothing changed.
Another attempt I have made is testing this on another WP / Genesis / Newspro website, with the same result.
Please note that all versions are the latest releases: WP / VC / Genesis.
October 22, 2014 at 1:09 am #128721report
MemberRight! That works fine, thank you braddalton.
Anyway, no need to say that if VC could work, that would be advisable.
October 22, 2014 at 1:14 am #128723Brad Dalton
ParticipantOnce you add support for use of shortcodes in widgets, you could then add them in text widgets.
You might also like to use HTML for buttons which i have also posted on my site
October 22, 2014 at 1:24 am #128725report
MemberThank you braddalton, you've been helpful!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.