Plugin Author
Alex
(@ahoereth)
Do other shortcodes work inside the grid?
Thread Starter
ba4z
(@ba4z)
Hi Alex,
Yeah I tried to do a video shortcode and that worked fine.
I’m trying to add video on header section but the plugin is not working, what should i do kindly..?
Thanks!
Plugin Author
Alex
(@ahoereth)
Try adding this to your functions.php
. I do not use visual composer, so this is untested.
// https://wpbakery.atlassian.net/wiki/display/VC/Adding+Custom+Shortcode+to+Grid+Builder
add_filter( 'vc_grid_item_shortcodes', 'featured_video_plus_vc_shortcode' );
function featured_video_plus_vc_shortcode( $shortcodes ) {
$shortcodes['featured-video-plus'] = array(
'name' => 'Featured Video',
'base' => 'featured-video-plus',
'category' => 'Content',
'description' => 'Outputs the featured video.',
'post_type' => Vc_Grid_Item_Editor::postType(),
);
return $shortcodes;
}
Thread Starter
ba4z
(@ba4z)
Hi Alex,
Thanks for the response.
It doesn’t show the text anymore, but no video is appearing either.
I check the html in the grid element after it’s been generated and there’s nothing there.
The option to select the featured video plus however, is showing up in the options to pick from. So I feel like we’re getting closer!
Plugin Author
Alex
(@ahoereth)
Can you check with 2.2.2?
Thread Starter
ba4z
(@ba4z)
Still nothing unfortunately 🙁
Did you ever get it working?
Thread Starter
ba4z
(@ba4z)
I didn’t get it to work. I’ll just have to find another way to do it.