Problem: I would like to display a YouTube video on my site, but when I try to use the embed shortcodes with the raw custom field value, the video URL appears.
Solution: Use the "embedded media" custom field type to display embedded YouTube videos. The embed shortcodes will be applied automatically.
Problem:
Unable to add posts/pages to an Access Post Group, the post selector field is not working.
Solution:
The problem occurs because of a conflict with the Slider Revolution plugin, which can be temporarily disabled while setting up the Post Group.
Problem:
A page with a View that includes custom CSS janks around when loading, i.e. the page loads without the styles and then after a delay the styles are applied.
Solution:
We may change the behaviour of how custom CSS is added, but at the moment it involves JS being used to apply the CSS.
This can be avoided by just adding your custom CSS inside style tags in any of the editors in a View.
Problem: I have a View of taxonomy terms displayed on my taxonomy WordPress Archive pages. I would like to highlight the current archive term in the View.
Solution: Use conditional HTML to compare the current archive term slug and the slug of the current term in the loop.
[wpv-conditional if="('[wpv-taxonomy-slug]' eq '[wpv-taxonomy-archive info='slug']')"]
This term matches the current archive term!
[/wpv-conditional]
Problem: I would like to customize the title of a post created with Toolset Forms. I would like to use the format "postid-posttimestamp-postreferencetitle", where post reference title is the title of the post selected in a post reference field in the Form.
Solution:
Use the cred_save_data hook to update the post title. Access the post ID from the hook inputs, get the post time using get_post_time, and get the reference field post title using get_the_title and toolset_get_related_post.
Problem: The list of Layouts has disappeared from Toolset > Layouts.
Solution: Clear cache and cookies, log out and log back in. If any Layouts are missing, find their IDs and edit them manually in wp-admin by accessing this URL:
/wp-admin/admin.php?page=dd_layouts_edit&layout_id=12345&action=edit
Change 12345 to match the Layout ID. If you are unsure of the missing Layout IDs, you can find them in the wp_posts table by searching for post_type = dd_layouts
Problem: I would like to use the Divi video slider module to display videos from posts related to the current post in a many-to-many (M2M) relationship.
Solution: Unfortunately the Divi video slider module does not allow you to insert shortcodes for dynamic or integrate with Views. This is a limitation of the Divi video slider module.
Problem: I have a repeating field group (RFG) applied to Products posts, but when I try to display the RFG information on the Product post the fields are not displaying.
Solution: Create a View of this RFG, filtered by post relationship, where the parent is set by the current post. Then build your loop to display each field from the RFG, and insert the View in your Product template.
Problem: I would like to display a list of term archive links on hierarchical term archive page. The list should display the parent term and any sibling terms of the current archive term.
Solution:
- Create a View of the Product Category taxonomy. Add a term parent Query Filter, where the term parent is set by the parent taxonomy archive View. Make sure "Don't show empty terms" is unchecked if you want to show all sibling terms regardless of their post count.
- In the Loop Output of this View, insert the wpv-taxonomy link shortcode for now. We will come back to this to display the current term with a highlight.
- Create another View of the Product Category taxonomy. Add a term Query Filter, where the term ID is set by one shortcode attribute "terms".
- In the Loop Output of this View, insert the wpv-taxonomy link shortcode. This will display the parent term. After that, insert the View you created in step 1.
- Add this custom code to functions.php:
- Create the WordPress Archive for the child-level Product Category taxonomy, if it does not exist yet.
- In the Loop, insert your second View, the one with the Query Filter using a shortcode attribute. Use the custom shortcode to pass in the parent term's ID: