WPBakery Grid builder get post content
I am trying to show full content of Post in WpBakerys Grid builder
I can only add Post Excerpt but i would like to add full content not summary.I saw that I can add custom field but don't know Field key name of Post Content.
In short how can i show full post content instead of Excerpt?
Solutions
You can add a custom shortcode to the Grid Builder:
add_filter( 'vc_grid_item_shortcodes', 'my_module_add_grid_shortcodes' );
function my_module_add_grid_shortcodes( $shortcodes ) {
$shortcodes['vc_post_content'] = array(
'name' => __( 'Post Content', 'my-text-domain' ),
'base' => 'vc_post_content',
'category' => __( 'Content', 'my-text-domain' ),
'description' => __( 'Show current post content', 'my-text-domain' ),
'post_type' => Vc_Grid_Item_Editor::postType(),
);
return $shortcodes;
}
// output function
add_shortcode( 'vc_post_content', 'vc_post_content_render' );
function vc_post_content_render() {
return '<p>{{ post_data:post_content }}</p>'; // usage of template variable post_data with argument "post_content"
}
Source: https://kb.wpbakery.com/docs/developers-how-tos/adding-custom-shortcode-to-grid-builder/#AddingCustomShortcodetoGridBuilder-Templatevariablesusage
Similar questions
WPBakery Page builder showing code in UI page in theme
In blog theme There are two pages 1) All Post in one page 2) Detail post page To build page we are using wpbakery When we see the page type 1(All post in one page) some of page bakery's back end code is showing where as It should be design. Where as page 2(detail post) is working fine. Here is Image for Blog list page. Image for Page 2 Blog detail....
How to enable Wpbakery Page Builder(Visual Composer) in CMB2 "wysiwyg" type?
I am adding a custom metabox text editor in wordpress with CMB2 for post type. Here Wpbakery Page Builder(Visual Composer) is enabled in default post type editor. but i can't able to enable Wpbakery Page Builder(Visual Composer) in custom post editor which i have implemented with CMB2 metabox. It has been implemented with "wysiwyg" type. Is there a...
WPBakery Page Builder not rendering shortcodes on WooCommerce Product Category pages
I'm developing quite a complex theme in which I have created custom post types for "Headers" and "Footers" for which I have enabled WPBakery Page Builder (currently using v5.5.5 in Wordpress 4.9.8). In header.php, the Header post is pulled in and rendered inside the <header> tag, and then in footer.php the Footer post is pulled in and rendere...
WPBakery Page Builder with taxonomy dropdown not working
I am trying to build a custom element for WPBakery Page Builder with a dropdown where custom taxonomy elements (categories) are listed. Unfortunately I end up with empty dropdown elements. What am I doing wrong here? The $options array gets filled perfectly when I var_dump it. This is my params array inside the vc_map() function:
Change logo with WPBakery Page Builder 5.4
How change logo with WPBakery Page Builder 5.4. I not found that page in admin panel. Thank you