Views plugin provides an API, making it easy to display Views output using PHP.
When you ask for help or report issues, make sure to tell us all related information about your View and the data that you want to display using the Views API.
Viewing 15 topics - 361 through 375 (of 455 total)
How this works is that it gives you the shortcode [current_language id='[wpv-post-id]' part='display_name'] this should give you the correct information.
Also you can add the code for the shortcode in the toolset custom code section under Toolset -> Settings -> Custom Code.
Problem: I would like to display a View using PHP. The View displays sibling posts of the current post using a shortcode attribute in the post relationship filter.
Solution: Use the post relationships API to get the parent post ID, then pass that value into the render_view API using the shortcode attribute name as the key.
global $post; // the current episodic review post object. Depending on how you implement this code you may need to change this
$parent_id = toolset_get_related_post( $post->ID, 'game-with-episodic-content', 'parent', array(), null );
$args = array(
'name' => 'related-episodic-reviews-sidebar',
'wpvrelatedto' => $parent_id
);
echo render_view( $args );
Problem:
How to use views PHP API function get_view_query_results with third party custom plugin
Solution:
you should try to use the WordPress standard hook wp_loaded that will allow you to use the view's PHP API function with custom plugin in this case.
Problem:
When updating Toolset this error appears: The package could not be installed. PCLZIP_ERR_BAD_FORMAT (-10) unable to find end of central Dir Record signature.
Solution:
This issue was solved in previous Toolset versions.
If you see this again please contact us.