I am trying to:
i have a cpt (magazine-issue)
made a layout for cpt archive
and inserted an archive-view created with toolset-wp-archive for the magazine-issue archive
i also made a content template for the archive and inserted the content template into layout
i only use the layout because content template for archive use didnt bypassed theme loop for archive page
Link to a page where the issue can be seen:
hidden link
I expected to see:
layout output with the toolset archive settings
Instead, I got:
theme archive loop
i have a child theme,
parent theme called AZOOM
get the content function: azoom_get_the_content()
single content template php (used for archive also) :
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?> rel="<?php if(is_single()): echo 'single-post'; else: echo 'loop-post'; endif; ?>">
<?php echo azoom_get_boxed_date(); ?>
<div class="article-details <?php echo azoom_article_details_class(); ?>">
<header class="entry-header">
<?php echo azoom_get_entry_header(); ?>
</header><!-- .entry-header -->
<?php if ( is_search() || (!is_single() && xr_get_option('post_summary') === 'excerpt')) : // Only display Excerpts for Search ?>
<div class="entry-summary">
<?php echo azoom_get_post_loop_description(); ?>
</div><!-- .entry-summary -->
<?php else : ?>
<div class="entry-content">
<?php echo azoom_get_the_content(); ?>
<?php azoom_get_link_pages(); ?>
</div><!-- .entry-content -->
<?php endif; ?>
<footer class="entry-meta">
<div class="entry-footer-details">
<?php azoom_entry_footer_meta(); ?>
</div>
<div class="more-content-links">תכנים נוספים שעשויים לעניין אותך מהאתר שלנו:</div>
<?php do_action('rockthemes_single_post_footer'); ?>
</footer><!-- .entry-meta -->
<?php do_action('rockthemes_single_post_after_footer'); ?>
<?php if ( is_single() && get_the_author_meta( 'description' )) : ?>
<?php get_template_part( 'author-bio' ); ?>
<?php endif; ?>
</div><!-- .article-details -->
</article><!-- #post -->
Hello,
First, it is not recommended to use Toolset Layouts plugin in your new project.
The Toolset Layouts plugin is currently in a maintenance mode. We do not plan adding new features to it.
Instead, we are switching our focus to allow you to design all your Toolset templates and elements using the WordPress native Block Editor:
https://toolset.com/documentation/legacy-features/toolset-layouts/layouts-theme-integration/
In your case, you can integrate Toolset Layouts with your theme with function the_ddlayout(), for example:
//If Layouts is active and an Layout is assigned to a Post Type (rendered by this template), use Layouts
if ( defined( 'WPDDL_VERSION' ) && is_ddlayout_assigned() ) {
get_header( 'layouts' ); //Optional call to a header-layouts.php template
the_ddlayout( 'page-default' ); // Loads the 'page-default' layout by default(can be empty)
get_footer( 'layouts' ); //Optional call to a footer-layouts.php template
}
Put above codes into your theme file, Toolset Layouts plugin will work within the range of above codes.
i don't want to use layouts.
i didn't found a way to replace a default (theme template) archive page for a Types cpt Magazine-issue
i made an wordpress archive view with toolset, assigned to Magazine-issue cpt archive. then i wanted to use it as an alternative to my theme default archive pages.
i know that i need a content template for archive pages, so i made one but it didnt replaced the default archive page,
my theme is using its single.php for archives and terms as well and calling the template
<?php /* The loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>
<?php
if(is_single()):
?>
<!--<div class="vertical-space"></div>-->
<?php endif; ?>
<?php comments_template(); ?>
<?php endwhile; ?>
in content.php it uses the func of azoom_get_the_content()
which is in my toolset settings
please help me to bypass the theme content for archive,terms,tax,search...
only single custom post content templates assigned to the single post type is bypassing theme content templates
the site is live but i can give access to help me resolved this issue.
theres another one - which will go in a new support ticket (about a tax' filter that shows all of the terms inputs when the page is loaded even when the settings are to hide non relevant term inputs. )
the file for archives was a different one,
i found the if statement that displays theme loop or the_content
changed it to not include my cpt
elseif(function_exists('azoom_call_portfolio_shortcode') && ($post_type !== 'post') && ($post_type !== 'magazine-issue')):
i didn't wanted to use layouts, i'll cancel the plugin
i found where my theme is conditioning the display for archives under index.php
and added an exception for my CPT magazine issue, then the layout appeard
elseif(function_exists('azoom_call_portfolio_shortcode') && $term && ($post_type !== 'post') && ($post_type !== 'magazine-issue')):
how do i use wordpress CPT archive loops without a layout or blocks?
or - how to display a custom archive pages for my custom taxonomies?
is it with blocks editor OR layouts only?
i have wp archive created with loop output in classic mode
i have classic mode content templates for taxo' & cpt archives
i want to use or classic editors or wp-bakery builder (formally visual composer)
but i will fall back to use block editor to accomplish displaying the content template + archive loop on archive pages
please help me choose the best approach to achieve this
the layouts plugin was in the project from 2017, but in a new theme template i found the problem in an updated condition to show a theme function to loop the archive post type.
now i'm using the wp archive views + archive content templates inside of the output editor of the archive view.
thank you, my issue is resolved now.