Problem:
How to wrap an entire Layout output in a custom
<div></div>
tag.
Solution:
This is not possible directly from the UI of Layouts Plugin.
Let's see an example on
page.php
of our Starter Theme "Toolset Starter"
https://toolset.com/account/downloads/#example-themes
In
page.php
you have currently this:
if ( defined( 'WPDDL_VERSION' ) ) : get_header( 'layouts', 'page-default'); toolset_assigned_message('layout-page', 'page-default'); the_ddlayout( 'page-default' ); // Loads 'page-default' layout by default get_footer( 'layouts' ); else:// more code follows
If you now wrap the
the_ddlayout( 'page-default' )
into your "div" tag, it will also render as such in the Front End (entire layout wrapped in a custom "div")
EXAMPLE:
<div class="wrap">
<?php the_ddlayout( 'page-default' ); // Loads 'page-default' layout by default ?>
</div>
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
- | - | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 | 14:00 – 20:00 |
- | - | - | - | - | - | - |
Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)
This topic contains 2 replies, has 2 voices.
Last updated by Evan Seplow 7 years, 6 months ago.
Assigned support staff: Beda.