With the Views plugin you can create different Views elements to display all your custom types and content on the front-end, without coding. You can also create powerful parametric searches and add pagination to your content lists.
When you ask for help or report issues, make sure to tell us the options of your View.
Viewing 15 topics - 4,801 through 4,815 (of 4,854 total)
Problem: I have a Bootstrap grid View that appears to be working correctly when more than one result is displayed, but if only one result is displayed the grid is broken. Columns are nested inside other columns that should be siblings.
Solution: Check for missing closing tags. Simplify the loop output to isolate any potential markup problems. These could be in a nested View, or in the contents of a field being displayed in the View, or a template, for example.
Problem:
Creating a post by the user after logging in, and
Editing a post, by the user that creates it, when the user logs in.
Solution:
Create a new post Form
Place the Form on a Page
Use Access to create a Post Group
Edit the Page with the Form and add it to the Post Group
Restrict read-access for Guests in this Post Group
Now Users can create a Post after they log in, but Guests cannot create a Post because they cannot access this Page.
Create an edit post Form
Place the Form on a Page, and add the same Post Group used before
Now Users can edit a Post after they log in, but Guests cannot edit a Post because they cannot access this Page.
Solution:
The client was inserting the same map twice (using the wpv-map-render shortcode twice with the same id) onto the same page which broke its functionality.
Problem: I would like to trigger an animation effect after the results of a View are updated with AJAX. I would also like to fix a problem where pagination reloads the page, even though I have selected AJAX pagination updates.
Solution: Use the Frontend Events button in the Search and Pagination JS editor to create event listeners that will allow you to respond to search and pagination events with any custom JavaScript. The AJAX pagination issue seems to be a problem with the custom theme that should be addressed by a JavaScript developer.
Problem: I am using a one-to-many relationship where Products are children and Styles are parents. I would like to create a View of Products to display on the Style post. This View should only show children of the Style post. In that list of Products I would like to display an Add to Cart button.
Solution: Create a View of Products, filtered by post relationship, where the parent post is set by the current page. In the Loop, include the wpv-woo-buy-or-select shortcode to generate the Add to Cart button.
Problem:
The client is producing a list of content that he wants to appear in modals and has the problem that all of the links to open a modal open the same first modal content.
Solution:
The modals implementation requires linking to modal elements by their id, and the loop output section of the View uses "static" markup for the id, so the markup for each modal has the same id. You need to generate unique ids using the wpv-post-id shortcode (for posts) or wpv-taxonomy-id shortcode (for taxonomy terms), e.g.
Problem: I would like to create a select field with options based on a post's custom field values, and use that field in Contact Form 7.
Solution: Use get_post_meta to get all the values of the custom field for the current post, then loop over those values to build the markup for a select field.
Get the colors postmeta values for this post as an array, then loop over the array items to concatenate the options.
[php]
global $post;
$output = '<select name="color">';
$colors = get_post_meta($post->ID, 'wpcf-color', true); // 3rd param 'true' because we want an array
foreach( $colors as $color) {
$output .= '<option value="' . $color . '">' . $color . ' </option>';
}
$output .= '</select>';
return $output;