Views is a WordPress plugin that lets you easily display content on your website's front-end in any way you choose.
Views User Guides include detailed documentation for creating lists of content, templates for content and archive page and also explain how to create parametric searches for any content type.
When you ask for help or report issues, make sure to tell us the versions of the Toolset plugins that you have installed and activated.
Viewing 15 topics - 2,176 through 2,190 (of 3,146 total)
Problem: I am using a Fields and Text block to display some text, including the post slug. I have set the text-transform property for this block to be "uppercase" but the slug always displays in lowercase.
Solution: It seems that GeneratePress includes some styles for H1 elements that includes the property text-transform: none;, and you would have to override that using custom CSS. Add the CSS class tb-uppercase-override to the Fields and Text block, then add this CSS in the template, an enqueued CSS file, or in Appearance > Customize > Additional CSS:
Problem: I have two post types in a one-to-many post relationship. Artists are the parents, and Paintings are the children. In the Artists post type, I have a checkbox custom field. I would like to create a View of Artist posts that only shows Artists with related Paintings. I would also like to include any Artist where the checkbox is checked.
Solution: To accomplish this without custom code, you need 3 Views:
- #1: View of Artists, filtered by checkbox field. Use the legacy Views editor and choose the output type "List with separators". Output the Artists IDs as a comma-separated list.
- #2: View of Artists, filtered by post ID using a shortcode attribute "ids". Design the output as you would like to see on the front-end of the site.
- #3: View of Paintings with no filters. Use the legacy Views editor and choose the output type "List with separators". In the loop, include the post ID of the parent Artist post.
Insert View #2 in your template or page using a shortcode. In the ids attribute, place View #1 and View #3.
Problem:
The user is using the same archive template for the custom post type and certain taxonomies. He uses two views he would like to use inside of the archive template and display one of them for post type archive page and the other for the taxonomy archive pages.
Solution:
This can be implemented using the Conditional block, but you will need to create, and register, a custom function to be used inside the conditional block. Check the article below
The function can use WordPress core functions to check if the current page is the post type archive or the taxonomy archive.
Problem: When the plugin WP Login Form is active, custom search Views are not working as expected if the filters and results are displayed separately via separate shortcodes or widgets.
Solution: Update the wp-login-form plugin to get the latest version, which includes a fix for this problem.
Add the above to your Toolset custom code section in Toolset -> Custom Code and activate it. You will need to change the 44576 to your view's id as well as the wpcf-banner to the slug of your image field keeping the wpcf- prefix.
Problem: I would like to display the Comments input field and existing comments in the template for a custom post type, but I do not understand how to display them in my Content Template using Toolset Blocks.
Solution: Normally the comments section is displayed by the theme when comments and discussion are enabled for a post. Usually no additional blocks are necessary in the Content Template. To enable comments for Rezensionen posts, go to Toolset > Post Types and edit the post type Rezensionen. In the Sections to display when editing panel, activate comments. Now when you create or edit a Rezensionen post in wp-admin, you have the ability to turn on or turn off discussion for that individual post.