Views is a WordPress plugin that lets you easily design the display of single pages using content templates. You can also include any field belonging to the content in your templates, without writing PHP code.
When you ask for help or report issues, make sure to tell us what you have created so far and what you want to achieve.
Viewing 15 topics - 3,166 through 3,180 (of 3,935 total)
Problem: On a single product post, I would like to display all the other products in the same product taxonomy
Solution: Create a View of Products, filtered by taxonomy, based on a shortcode parameter. Place that View in your single product Content Template using a shortcode parameter. Pass the desired Taxonomy slug into the View using your shortcode.
Problem: Visual Composer shortcodes are not being interpreted when search results are updated using AJAX filters. Shortcodes are being written out in HTML instead of being processed and replaced.
Solution: Add the following code to your functions.php file:
add_action('init', 'add_mapped_shortcodes_on_init');
function add_mapped_shortcodes_on_init()
{
WPBMap::addAllMappedShortcodes();
}
Problem: My site's sidebar is rendered below the main content instead of beside it
Solution: Disable the synved social buttons plugin, make sure no content is duplicated in your page source, make sure your HTML is valid and elements are closed appropriately
Problem: I would like to include a Content Template in multiple Layouts. I would like that Content Template to output different content depending on whether it is rendered on a specific Layout, or on an archive page, or on a single post.
Solution: Types does not currently provide any shortcode that can easily determine the context in which a Content Template is being displayed. In other words, it's not possible to determine if the Content Template is being rendered from an archive, a single page, a View, or a Layout. Instead of using a Content Template in your Layouts, something like this can be accomplished with a View using shortcodes. Instead of placing a Content Template in your Layout or archive, you should place a View using a shortcode that indicates which content should be displayed. This way, you can pass in shortcode parameters that can be used for conditional logic.