Theme conflict with wordpress menu

Hey,

We’ve had an issue for a while now where when trying to add menu items to the WordPress menu for the website the page times out and we get an ‘aw snap’ memory limit reached error in chrome. The same issue across other browsers too and it means we can’t add new web pages to our website.

We’ve checked for plugin conflicts, we’ve upgraded our hosting package, we’ve updated anything we can but nothing fixed it.

As a last resort, we tried to change the theme on our staging site from pro to WordPress twenty twenty-one theme and now it works perfectly.

Is this a known issue? Can you help as it is a huge problem for us?

Thanks

Hi @hannahlincoln,

Thanks for reaching out.
I have checked your staging site by adding a new menu item and it added perfectly fine. I have added multiple menu items too and it worked perfectly fine too. I would suggest please provide any video that helps us to recognize the problem.

Thanks

The reason it works perfectly on the staging site is because I’ve disabled pro theme and instead installed wordpress’ theme. Try it on the live site and you’ll see the issues experienced. Also please feel free to activate the pro child theme on the staging site if you’d prefer.

Let me know if you want videos still.

Hi @hannahlincoln,

I have checked that by activating the Pro and found that it was working fine at your staging site. I would suggest you check once by adding a new menu item.
If you find the same issue again, there might be some different reasons behind your issue. I would like to suggest you check once by deactivating all the plugins once and let us know how that works.

Thanks

Hey,

I saw you activated Pro instead of Pro child theme so that might be why?

Heres a video I recorded, first part is with pro child theme enabled, second part is with a Wordpress theme enabled.

Hopefully this helps you see the issue. I’ve already gone through to check for plugin conflicts and there is not any, the conflict is the pro child theme.

Hello @hannahlincoln,

When I go to Appearance > Menus, it will take a while or even break my browser to load the menu items. This usually relates to the Max Input vars setting in your server. Can you please check out this article first?

Kindly let us know how it goes.

Hi,

Yes we have already tried this to no avail.

Again, its a conflict between our pro child theme and the menu. We’ve tried changing the max input vars setting, testing plugin conflicts etc. We even upgraded our hosting package but nothing else has worked apart from removing the pro child theme.

Thanks

Hello @hannahlincoln,

One of the custom PHP codes added in your child theme’s functions.php file is causing the issue.

// RSS Functions
// =============================================================================

function add_media_namespace() {
  echo 'xmlns:media="http://search.yahoo.com/mrss/"'."\n";
}
add_action( 'rss2_ns', 'add_media_namespace' );

function add_rss_image(){
	global $post;

	$output = '';
	if ( has_post_thumbnail( $post->ID ) ) {
		$thumbnail_ID = get_post_thumbnail_id( $post->ID );
		$thumbnail = wp_get_attachment_image_src( $thumbnail_ID, array(640, 9999) );

		$output .= '<media:thumbnail';
		$output .= ' url="'. $thumbnail[0] .'"';
		$output .= ' width="'. $thumbnail[1] .'"';
		$output .= ' height="'. $thumbnail[2] .'"';
		$output .= ' />';
	}
	echo $output;
}
add_action( 'rss2_item', 'add_rss_image' );



// Additional Functions
// =============================================================================

/*
* Yoast SEO Disable Automatic Redirects for
* Posts And Pages
* Credit: Yoast Development Team
* Last Tested: May 09 2017 using Yoast SEO Premium 4.7.1 on WordPress 4.7.4
*/
add_filter('wpseo_premium_post_redirect_slug_change', '__return_true' );

/*
* Yoast SEO Disable Automatic Redirects for
* Taxonomies (Category, Tags, Etc)
* Credit: Yoast Development Team
* Last Tested: May 09 2017 using Yoast SEO Premium 4.7.1 on WordPress 4.7.4
*/
add_filter('wpseo_premium_term_redirect_slug_change', '__return_true' );

// add blog title 
function add_blog_title() {
    if(is_home()) {
        ?>
        <header class="x-header-landmark x-container max width">
                <h1 class="h-landmark"><span>Sage Blog</span></h1>
			                <p class="p-landmark-sub"><span>Sage 200cloud, Sage Intacct, Sage 50cloud and Business Processes</span></p>
        </header>
        <?php
    } else if ( is_archive() ) { ?>
        <header class="x-header-landmark x-container max width">
                <h1 class="h-landmark"><span><?php echo single_cat_title("", false); ?></span></h1>
                <p class="p-landmark-sub"><?php echo category_description(); ?></p>
        </header>
<?php }
}

add_action('x_after_view_global__slider-below', 'add_blog_title');

// make hubspot forms work by not being previewed in the builder //
add_shortcode( 'cs_no_preview', function( $atts, $content = '') {
  return did_action( 'cs_element_rendering' ) || did_action( 'cs_before_preview_frame' ) ? '' : $content;
});

You may need to contact the creators of these codes or that you remove the PHP one by one to figure out which PHP code block is causing the issue.

Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third-party developer.

Kindly let us know how it goes.

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