Skip Navigation

[Resolved] Include a Toolset Archive in a Layout

This thread is resolved. Here is a description of the problem and solution.

Problem:
How can I display a Toolset Archive created with WordPress Archive Views into a Layout?

Solution:
You integrated Layouts Plugin in your Archive PHP File of your Theme.
This is done by callind the_ddlyout() in the Archive Loop.

Then createa a Layout and assign to your Archives

Once you assigned the Layout, you include your Archive Cell in this Layout.

Relevant Documentation:
https://toolset.com/documentation/user-guides/designing-pages-archive-templates-using-views-plugin/
https://toolset.com/documentation/user-guides/develop-layouts-based-themes/
https://toolset.com/documentation/user-guides/layouts-theme-integration/
https://toolset.com/documentation/user-guides/wordpress-archive-cell/

This support ticket is created 6 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

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 Ole Andreas Vekve 6 years, 4 months ago.

Assigned support staff: Beda.

Author
Posts
#419525

I am trying to: Add WordPress Archive.

I visited this URL: https://toolset.com/documentation/user-guides/normal-vs-archive-views/

I expected to see all my posts.

Instead, I got nothing. Only the title, which I have set in archive.php-file shows. None of my posts appears. All posts should display. Using pagination I have set only 20 to show up before manual transition.

Here is my archive PHP:

<?php get_header(); ?>

<div class="clearfix">
    <div class="holder">
        <div class="container">
            <div class="col-md-12">
                <h1 class="light">Kunst</h1>
            </div>
        </div>
        <div class="container luft">
        	<div class="col-md-12">
                <div class="row">
                    <?php the_ddlayout('default-layout'); ?>
                </div>
            </div>
        </div>
    </div>
</div>

<?php get_sidebar(); get_footer(); ?>

Here is my code for WordPress Archive with Types:

[wpv-layout-start]
	[wpv-items-found]
	<!-- wpv-loop-start -->
	<wpv-loop wrap="4" pad="true">
          	<div class="col-md-3">
              	<div class="col-sm-12 maximg nopadding maximg">
              		[wpv-post-featured-image size="post_thumb"]
				</div>
              	<div class="clearfix"></div>                                    
              	<div class="padding lefttext color1 whitetext">
                  <h1 class="twentyfive lefttext nomarginbottom">[types field='kunstner'][/types]</h1>
                  <h2 class="nomargintop color2text semibold">[wpv-post-title]</h2>
                  <div class="col-sm-6 nopadding">
                    <a href="[wpv-post-url]" class="btn btn-small btn-small btn-outline-fill-color2 displayblock" role="button" title="[wpv-post-title]" onmouseover="this.title='';">[types field='pris'][/types]</a> 
                  </div>
                  <div class="col-sm-6 nopadding">
                    <a href="[wpv-post-url]" class="btn btn-small btn-fill-color2 displayblock" role="button" title="[wpv-post-title]" onmouseover="this.title='';">Les mer</a> 
                  </div>
                  <div class="clearfix"></div>     
              	</div>
		</div>
	</wpv-loop>
	<!-- wpv-loop-end -->
	[/wpv-items-found]
	[wpv-no-items-found]
		<strong>[wpml-string context="wpv-views"]No items found[/wpml-string]</strong>
	[/wpv-no-items-found]
[wpv-layout-end]

Any ideas?

#419590

You integrated Layouts Plugin in your Archive.

This will call a Layout, by default a Layout with slug 'default-layout' as you have defined it in the the_ddlayout() function.

It will call any other Layout as well if the Layout is assigned to your Archives (it depends on which archive you assign it to, this can be search, home, month, etc).

Once you assigned the Layout, you include your Archive Cell in this Layout.

Here is more help:
https://toolset.com/documentation/user-guides/designing-pages-archive-templates-using-views-plugin/
https://toolset.com/documentation/user-guides/develop-layouts-based-themes/
https://toolset.com/documentation/user-guides/layouts-theme-integration/
https://toolset.com/documentation/user-guides/wordpress-archive-cell/

#420467

Thanks,

Problem solved.