Layouts is a WordPress plugin that lets you design responsive layouts for entire pages, from the header down to the footer.
Layouts User Guides include detailed documentation on how Layouts editor works and how you can create Layouts and assign them to specific content, or as templates for all items of a post 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 - 1,711 through 1,725 (of 1,748 total)
Problem: I have Layout A assigned as the Layout for the Pages post type. However, under certain circumstances I would like to preselect Layout B when a Page is being created in wp-admin.
Solution: There's not a filter available to manipulate the selected Layout here, but you could use the WordPress "save_post" hook to override the User's Layout selection when the post is saved.
function override_default_layout( $post_id ) {
if( get_post_type($post_id) == 'page' && wp_get_post_parent_id( $post_id ) == 1234 ) {
// this page is a child of the page with ID 1234 so we need to update the _layouts_template postmeta
update_post_meta( $post_id, '_layouts_template', 'template-slug');
}
}
add_action( 'save_post', 'override_default_layout', 100 );
Change '1234' to match the numeric ID of the Photos page, and change 'template-slug' to match the slug of the correct Layout. This way, no matter what is selected, the correct Layout will be applied.
Problem:
1. In this page and in all that I use a toolset layout, the page header change is colour to #ffffff instead #88d0c9 as should be by Divi Theme. You can see if you click other menus.
2. On this page http://apmredemut.pt/associacoes/mutualidade-da-moita-am/ I list the taxonomies associated to that post (associacao). But the hierarchy is not reflected in the way it appears. I would like to show them organized as I made in the sidebar view.
Solutions:
1. Update to the latest versions of Divi and Toolset plugins
2. Create a View of your custom Taxonomy. Add a Query Filter to filter by parent term. Select parent is "None". Then in the Loop Output editor, output the taxonomy title using the [wpv-taxonomy-title] shortcode.
Then create another View of your custom Taxonomy. Add a Query Filter to filter by parent term, and select "Parent is the taxonomy selected by the parent Taxonomy View". Then in the Loop Output editor, output the taxonomy title using the [wpv-taxonomy-title] shortcode.
Next, return to the first View, and add your 2nd View inside the Loop Output just after the [wpv-taxonomy-title] shortcode.
You can add as many nested Views as you need to achieve the hierarchical structure of your taxonomy. A nested unordered list can be used to set up indentation if you'd like.
Finally add a filter to each View: "Taxonomy Term is set by page where this View is inserted". This will limit the terms to only those associated with the post.