Skip Navigation

[Resolved] Changing theme crashes content template

This support ticket is created 6 years, 2 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 1 reply, has 2 voices.

Last updated by Shane 6 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1159997
layout-shapely-theme.jpg

I am trying to: change a theme from Shapely to OceanWP

Link to a page where the issue can be seen: hidden link

I expected to see: See attachment

Instead, I got: an error message Fatal error: Uncaught Error: Call to undefined function shapely_get_layout_class() in /home/koelictontwikkel/zme.koelictontwikkelt.nl/wp-content/themes/oceanwp-child/single-bedrijf.php:16 Stack trace: #0 /home/koelictontwikkel/zme.koelictontwikkelt.nl/wp-includes/template-loader.php(74): include() #1 /home/koelictontwikkel/zme.koelictontwikkelt.nl/wp-blog-header.php(19): require_once('/home/koelicton...') #2 /home/koelictontwikkel/zme.koelictontwikkelt.nl/index.php(17): require('/home/koelicton...') #3 {main} thrown in /home/koelictontwikkel/zme.koelictontwikkelt.nl/wp-content/themes/oceanwp-child/single-bedrijf.php on line 16

This is the code:

<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site may use a
* different template.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package Oceanwp
*/

get_header(); ?>
<?php $layout_class = shapely_get_layout_class(); ?>
<div class="row">
<div id="primary" class="col-md-12 mb-xs-24 --><?php echo esc_attr( $layout_class ); ?><!--">
<?php
while ( have_posts() ) :
the_post();

get_template_part( 'template-parts/content', 'page' );

// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;

endwhile; // End of the loop.
?>
</div>
</div>
<?php
$args = array(
'title' => 'Slider',
'myattribute' => 'slider'
);
echo render_view( $args );
get_footer();

#1160006

Shane
Supporter

Languages: English (English )

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

Hi Chris,

Thank you for contacting our support forum.

The problem is that you are calling a function "shapely_get_layout_class()" that has ben defined in the shapely theme.

Now that the theme is deactivated this function is no longer available.

So I would recommend that you comment out here <?php $layout_class = shapely_get_layout_class(); ?>
As well as here <div id="primary" class="col-md-12 mb-xs-24 --><?php echo esc_attr( $layout_class ); ?><!--">

This should resolve the issue.

Thanks,
Shane