|Using view with custom attribute as an option for generic select field||2||1 hour, 51 minutes ago|
|Displaying more than one RFG in a single view for a single post type||2||2 hours, 14 minutes ago|
|Showing Term Fields on Taxonomy Archives||2||1 day, 8 hours ago|
|Filter Code||2||2 days, 9 hours ago|
|How to show the related posts through a view (referring to an earlier threat)||2||5 days, 7 hours ago|
|Content Template Name and Slug||3||3 weeks ago|
|How to auto-populate a relationship field in a post form?||2||3 weeks ago|
|Help styling search buttons independently||2||4 weeks ago|
|Uncheck checkbox in specific time.||2||1 month ago|
|Filter CPT by User Roll||2||1 month, 2 weeks ago|
Need a more stable way of hiding CPTs that have no child relations…
Problem: I have a nested View structure that shows parent posts in the outer View and child posts in the nested View. In some cases the parent post has no child posts, and I would like to hide those parent posts in the results. The problem is that the nested child post View is filtered. Is there a conditional that tests whether or not a parent post contains these filtered child posts?
Solution: You can solve this without custom code by restructuring the Views. Instead of displaying the parent post information in the outer View, display the parent post information in the nested child View, inside wpv-items-found but outside wpv-loop. Use the item attribute to display parent post information with any shortcodes in the nested View, since the post context in the nested View is the context of the child posts. The syntax for the item attribute is item="@relationship-slug.parent" in a typical one-to-many (O2M) relationship.
Relevant Documentation: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/item-attribute/
|3||1 month, 2 weeks ago|
|Renaming Pagination Buttons on Glossary Page||2||1 month, 3 weeks ago|
|hide search results until user enters text and hits submit||2||1 month, 3 weeks ago|
|Relationship Forms only show One-to-Many relationships, not Many-to-Many relationships 1 2||2||1 month, 3 weeks ago|
Issues with map loading speed and issues with distance value…
Problem: I have a View of custom posts that displays a map with markers, using a distance filter and sorting results by distance. In some cases the distance center is set by a URL parameter, and in others, it is set by a shortcode attribute. I have implemented some custom code in a wpv_view_settings filter to toggle between the shortcode attribute and the URL parameter. In the cases where distance center is set by a shortcode attribute, I am using another custom shortcode to get the User's predicted zip code. That shortcodes an external service to get a predicted zip code based on the User's IP address. The custom zip code service seems to be working correctly, and the results of the View seem to be accurate.
However, in the cases where this zip code shortcode is used to set the View's distance Query Filter by shortcode attribute, the View consistently causes the page generation time to jump by 3 or more seconds. I would like to try to optimize the page load time as much as possible.
Solution: In this case, testing revealed that using the custom zip shortcode inside a wpv_view_settings filter callback was the source of the delay in page generation, for some reason not fully understood. Replacing that shortcode with a hard-coded zip code resulted in a page generation time just a fraction of a second higher than the page without the View present at all. Optimization of the zip code shortcode is necessary to prevent the latency seen in page generation time.
|2||2 months ago|