mercredi 2 mars 2016

WordPress Visual Composer grid_ID causing problems

I'm using WordPress and the Visual Composer plugin. Essentially I'm generating pages which each have a series of posts.

Each page I make (using PHP - not the WordPress admin panel) has this shortcode written into it:

[vc_row][vc_column][vc_masonry_grid post_type="post" max_items="-1" show_filter="yes" filter_size="lg" filter_source="category" taxonomies="56"][/vc_column][/vc_row]

Basically this code is meant to display a series of posts on the page from a certain taxonomy.

When I load the page, however, nothing appears. If I open the Visual Composer element and click save, it updates the shortcode adding the grid_id, as seen below and then the posts appear on the page as expected.

[vc_row][vc_column][vc_masonry_grid post_type="post" max_items="-1" show_filter="yes" filter_size="lg" filter_source="category" grid_id="vc_gid:1456811808044-d85b91c3-234b-8" taxonomies="56"][/vc_column][/vc_row]

I have tried inserting random numbers as a grid id to try and get the posts to display but it simply doesn't work. My question is: How would I insert a valid grid ID and have the posts appear without the need to manually go and click save on these Visual Composer elements?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire