Stand alone cornerstone doesn't work with custom theme

So I have this client’s site that is using an overly complex custom “page builder” which was created with Toolset Types. It is a completely custom theme which is a Frankenstein monster at this point.

Anyway, I decided to try and install a stand alone Cornerstone to see if I could build a new page they want more easily. I have a template file I am in complete control of and I have a standard loop outputting the_content:

	<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
		<h2><?php the_title(); ?></h2>
		<?php the_content(); ?>
	<?php endwhile; ?>
	<?php endif; ?>

Cornerstone loads just fine but there is no inspector or outline present. I cant add elements or begin the build at all. Do you have any advice on how to get this working in this type of environment?

Where is the outline and inspector? Where are the elements?

If this doesn’t work, it’s not the end of the world. I can build inside the existing environment but, I don’t want to. Cornerstone would be better for this.

Thanks for any help you can provide guys!

Hello @simeoned,

Thank you for the very detailed post information. The Cornerstone plugin should work as a standalone. We have tested the plugin even when using the Twenty Twenty One theme.

Please go over to your child theme’s custom template file. Make sure to include the header and the footer resources like the get_header() and get_footer() functions to load the header and the footer of the page.

Hope this helps.

get_header(); and get_footer();

Are both being called properly in the template file.

<?php
/*
*
* Template Name: Product Intermediate Page
*
*/
	get_header();

	get_template_part('template-parts/banner');
?>

	<main id="content" class="full site-content-wrapper">

		<section class="full section-intermediate-content blue-lines">
			<div class="container wide">

				<?php //if( is_page(10256) ) { ?>
					<?php
						// if(have_posts()) : while(have_posts()) : the_post();
						// 	echo '<h2>';
						// 		the_title();
						// 	echo '</h2>';
						// 	the_content()
						// endwhile;
						// endif; 
					?>

				<?php //} else { ?>
					<?php get_template_part('template-parts/page-builder','product-intermediate'); ?>
				<?php //} ?>

			</div>
		</section>
	</main>
<?php get_footer(); ?>

Any other ideas?

Hello @simeoned,

The loop in your template file has been commented out. Please have it updated and. uncomment those lines:

<?php
/*
*
* Template Name: Product Intermediate Page
*
*/
   get_header();

   get_template_part('template-parts/banner');
?>

   <main id="content" class="full site-content-wrapper">

      <section class="full section-intermediate-content blue-lines">
         <div class="container wide">

            <?php // if( is_page(10256) ) { ?>
               <?php
                  if(have_posts()) : while(have_posts()) : the_post();
                      echo '<h2>';
                         the_title();
                      echo '</h2>';
                      the_content()
                   endwhile;
                   endif; 
               ?>

            <?php // } else { ?>
               <?php get_template_part('template-parts/page-builder','product-intermediate'); ?>
            <?php // } ?>

         </div>
      </section>
   </main>
<?php get_footer(); ?>

Be advised that custom coding is beyond the scope of our support. Please also note that implementing and maintaining the code will be out of our support scope and for further maintenance for new possible versions of the theme that may cause the customization to break, you will need to hire a developer.

Best Regards.

@ruenel,

No, I simply pasted the wrong thing above. I didn’t realize the version I had commented was the one on my clipboard when I pasted and I didn’t proofread that part. My mistake.

The loop was in place as I was testing and cornerstone was still not displaying the inspector or outline anywhere.

Here is the updated template file I am using for this:

<?php
/*
*
* Template Name: Cornerstone Test
*
*/
	get_header();

	//get_template_part('template-parts/banner');
?>

	<main id="content" class="full site-content-wrapper">

		<section class="full section-intermediate-content blue-lines">
			<div class="container wide">			

				<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
					<div class="bump500"></div>
					<h2><?php the_title(); ?></h2>
					<?php the_content(); ?>

				<?php endwhile; ?>
				<?php endif; ?>

			</div>
		</section>
	</main>
<?php get_footer(); ?>

and the screenshot of the builder:

Hello @simeoned,

I have copied your template code and used it to create a custom cornerstone-test.php file on my Twenty Twenty One theme. It is working on my end:

Take note that I am doing this test to prove to you that Cornerstone is working as a standalone plugin while using a different theme like Twenty Twenty One theme along with a custom template file.

The issue you are having with your client’s site could be coming from one of the custom PHP codes in his child theme’s functions.php file or could be from the custom template file itself.

Be advised that custom coding is beyond the scope of our support. You may need to seek assistance from 3rd party developers or the creator of your client’s child theme in troubleshooting the ongoing issue in his site.

Thank you for your understanding.

Yes thank you, I get it. I don’t wanna keep messing around with this particular theme right now so I am abandoning this idea for the time being. I may pick it back up again in the future but for now I have built what I need to using the tools provided by the previous developer.

I just wanted to see if you guys had any experience with the way cornerstone broke in case it was something more simple and easy to address without wading through the spaghetti code that is this particular site’s functions.php. Thanks for the effort, movin’ on…

You’re welcome, @simeoned

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.