Skip Navigation

[Resolved] Can't get layouts to work

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.

Our next available supporter will start replying to tickets in about 0.50 hours from now. Thank you for your understanding.

This topic contains 11 replies, has 2 voices.

Last updated by nthulaneM 6 years, 3 months ago.

Assigned support staff: Riccardo Strobbia.

Author
Posts
#294115
Screen Shot 2015-04-07 at 11.24.45 PM.png
Screen Shot 2015-04-07 at 11.24.05 PM.png

I just bought Layouts and i'm trying to get it to work. I have integrated it, there doesn't seem to be any issues there. Please reply as soon as possible!

A few things:
1. After integrating, it seems like every pages/post needs to be assigned a customised layout otherwise a page does not show. Can't I just pick the default template in the theme?

2. I've created a carousel slider but it doesn't look right because the images are as small because they are logos so they pixelate, come out on one side and when I try to decrease the size of the slider, the images cut.

3. Is it possible to create a marquee type slider and not carousel?

4. Even after assigning a layout to a page, there is still the " Nothing Found - Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post." at the bottom.

The following pictures show what I would like to create in terms of marquee and what I am experiencing.

#294268

Dear nmakgato,

it seems you are experiencing different issues of different nature, let's try to put some order.

1. You can modify your templates in a way that they can handle layouts if present and normal WordPress loops otherwise. We have template tags in our API to help you do that, you can use in a way similar to this one in your template files:

if ( defined( 'WPDDL_VERSION' ) && is_ddlayout_assigned() ) : // if Layouts Plugin is active and a layout is assigned
	get_header( 'layouts' );
		the_ddlayout( 'page-default' ); // Loads 'page-default' layout by default
	get_footer( 'layouts' );
else: // if not use the normal WP loop
	get_header();
	if ( have_posts() ) : while ( have_posts() ) : the_post();
		toolset_assigned_message('content-template');
		the_content();
	endwhile; endif;  // WP Loop
	get_footer();
endif; // IF Layouts are enabled

Basically what this is doing is to check if Layouts plugin is active and if the resource has a layout assigned to it (is_ddlayout_assigned), if not the normal WordPress loop is used, otherwise the layout is used.

4. The information you are providing are not enough to understand the problem:

- the layout in question is associated to a single page or to the entire post type?
- what kind of content are you displaying with this layout (the current page content or other kind of content)?
- are you using a View to grab the data from the database or a content template?

Please give us some more detailed informations and eventually open a specific todo only for this issue, with the code of the template you are using to display the layout attached to it (I understand you're still working on localhost, so we can't access your website to help. am I right?)

2. This is a more general issue not directly related to Layouts plugin or any other Toolset plugin, not sure i can help with this without seeing directly what you are doing.

3. This is the slider we're currently shipping with Layouts plugin, you can try to style it in a different way - it think with some work you should be able to achieve what you want - or you can create a custom cell starting from the slider cell code to create your own slider with your own style - we can help doing that.

Just one request: it's way more easy for us to help solving issues and track eventual bugs if you open one ticket per issue instead of mixing multiple issues in one single ticket, so please open a specific ticket for the slider issue so we can assist in customising the default slider or eventually help create a new one in a custom cell.

Hope all this help, best regards
Riccardo

#294297

In line with your last request, i think it may be best for us to deal with one thing at a time.

About the code, I have followed the instructions on the Layouts Theme Integration page (https://toolset.com/documentation/user-guides/layouts-theme-integration/). I also don't know which php page the code refers to.

Here's what I think we should do. I am working locally but I have a live website. I can give you access to it and you could set up the code on the specific pages if that's not too much to ask. My local website is not working at all since following layout theme integration instructions, I don't want my live website to have the same fate.

Since the pages that we are updating are in themes, isn't there a possibility of losing the_ddlayout() once the theme is updated?

We'll deal with other problems later or in another thread.

#294301

Dear nmakgato,

that's very good idea, I am setting your next reply as private so you can provide access details and I can help with working examples.

Thanks in advance, best regards
Riccardo

#294361

Please send me an email once you have responded because i'm not receiving the emails that this forum is supposed to send.

#294574

Riccardo, you've been silent. My problem is still not resolved.

#294576

Dear nmakgato,

I am sorry I am going to work on your issue ASAP, it will be today anyway.

Please stand by and I'll let you know once done, best regards
Riccardo

#294756

Riccardo, you said you were going to sort this out before the end of today.

My web development is stalled because of this, a whole day has gone by as i've been waiting. What's up?!?!

#294759

Dear nmakgato,

I created a simple custom template and a layout for demonstration, it's the simplest thing you can do with Layouts.

This is the test page: hidden link
This is the simple layout: hidden link

Here's the code you can find in page-layouts.php:

<?php
/**
 * Template Name: Layouts page template
 * 
 */

if ( defined( 'WPDDL_VERSION' ) && is_ddlayout_assigned() ) : // if Layouts Plugin is active and a layout is assigned
    get_header( 'layouts' );
        the_ddlayout( 'page-default' ); // Loads 'page-default' layout by default
    get_footer( 'layouts' );
else: // if not use the normal WP loop
    get_header();

    get_template_part( 'loop-meta' );?>

<div class="<?php kamn_cs_layout( array( 'cs_layout_bone' => 'content_sidebar_wrapper_class' ) ); ?>">
  <div class="container">
    <div class="row">
  
      <div class="<?php kamn_cs_layout( array( 'cs_layout_bone' => 'content_column_class' ) ); ?>">
        <main class="content" role="main" itemprop="mainContentOfPage" itemscope="itemscope" itemtype="<em><u>hidden link</u></em>">   
      
          <?php if ( have_posts() ) : ?>
        
            <?php while ( have_posts() ) : the_post(); ?>
          
              <?php get_template_part( 'content', 'page' ); ?>
          
            <?php endwhile; ?>
        
          <?php else : ?>
                    
            <?php get_template_part( 'loop-error' ); ?>
        
          <?php endif; ?>        
      
        </main>
      </div>
    
      <?php get_sidebar(); ?>

    </div>
  </div>
</div>
  
<?php get_footer();
endif; // IF Layouts are enabled

Let me tell you that this theme is very structured and it is not the best choice to develop a theme with Layouts, a flat theme like our Bootstrap 3 Theme, our new Reference Sites Theme or a theme like roots.io, so to say a very basic theme with a very loose structure from where to start.

Layouts is very powerful and it's very easy to build up your own structures only using Layouts in combination with views.

Hope this helps.
Riccardo

#294761

Thanks for responding.

So you wouldn't suggest this theme to use layouts on?

How do I get access to your Bootstrap 3 Theme? Are there additional costs?

#294829

Dear nmakgato,

it really depends on what you want to do. If you need to use this theme for some particular reason, this is fine, for what I see the structure is perfectly compatible with Layouts, but being an already structured theme it will require some more customisation - to say it better: the customisation will require much more markup to be written in order to display properly.

If you want a base theme to implement a given design - not necessarily related with the theme you are currently using - I (but this is also my personal preference) would start from a very basic theme - something almost "naked".

The advantage you have using our themes is that they are shipped to be compatible with Layouts already - meaning there are already some templates already set for you, custom cells examples, predefined layouts.

You can find theLayouts demo for Bootstrap 3 theme here: https://toolset.com/account/downloads/#example-themes, no additional costs, you just need to go to the right tab under your account / download section and grab it.

Hope this helps,
Riccardo

#294903

I appreciate the feedback and assistance.