Skip Navigation

[Resolved] Remove the warning for layout prevent editing

This support ticket is created 5 years, 9 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.

This topic contains 6 replies, has 2 voices.

Last updated by Ole Andreas Vekve 5 years, 9 months ago.

Assigned support staff: Shane.

Author
Posts
#464020

On all my pages I get the following warning:


You are using the ### layout to design this page
The content editor is not displayed because #### does not include any shortcodes or cells that display post content.

I am aware of the problem by not integrating any shortcodes or cells thats display post content. This is because I use another method integrating this.

So my question is, how do I remove this warning without integrating any more shortcodes? I know the button Show editor anyway is there, but I don't want to press that each time.

Looking forward for your answer,

#464109

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ole,

Thank you for contacting our support forum.

This is actually a measure in place to ensure that customers don't forget to place the [wpv-post-body] shortcode inside their layouts.

If layouts is not going to be used to display the content using layouts ? What you can do is to not use layouts for this page and use your custom method.

It would be out of scope for us to do modifications of the code because this would require removing the mechanism that checks for the required shortcodes.

Thanks,
Shane

#464270

Thank you for your comment,

The only reason I use layouts for this page template is because I am showing a list of a specific post type. This is integrated by the following:

<?php the_ddlayout( 'default-layout' ); ?>

Is there a way I can change this into so it does not look after [wpv-post-body]?

Here is my entire template page if needed:

<?php
/* Template Name: Om oss */

register_taxonomy_for_object_type('post_tag', 'page');
get_header(); ?>

<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'toppbilde', 'mal' ); ?>

<article>
<?php get_template_part( 'ingress', 'm' ); ?>

<?php get_template_part( 'body', 'm' ); ?>

<?php include 'sporsmal.php'; ?>

<?php endwhile; // end of the loop. ?>

<div class="clearfix">
	<div class="holder">
		<h1>Våre ansatte</h1>
		<?php the_ddlayout( 'default-layout' ); ?>
	</div>
</div>
</article>

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

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ole,

If you are just using layouts to just display a list of posts from a specific CPT why not just use a regular view ?

A regular view should be able to do this without you having the setup a layout.

Please let me know if this helps.
Thanks,
Shane

#464535

Hello,

I believe I can do that. Do you have a tutorial for integrating and setting up a regular view?

#464548

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Ole.

We have a short tutorial in the link below that should be able to get you started.
https://toolset.com/documentation/user-guides/views/

Thanks,
Shane

#464574

Thank you,

Problem solved by adding this:

<?php echo do_shortcode( ' [wpv-view name="ansatte"] ' ); ?>

Where ansatte is CPT / name of the view.