Remove Custom Post Type – Layout Settings

Posted in: Newspaper
Post count: 104

I have noticed a “compatibility” problem with my MemberPress Pro plugin and custom post type, I believe I have so many taxonomy in a list, that when I try to open up some pages for MemberPress which use Hidden Custom Post Type, it doesn’t always load and dies, and I have to refresh several times and I think I have narrowed it down to the attempt to load the “Custom Post Type – Layout Settings” and populate the taxonomy list for the page. Is there a way to turn it off or disable it on these pages?

Appreciate any help, though it might be more a Memberpress issue not sure at this point.

Post count: 104

I notice loading the primary taxonomy is causing PHP to Fatal error out of memory, Allowed memory size of 536870912 bytes exhausted (tried to allocate 8388616 bytes). I have almost 2,000 tags, is that causing the issue? too many tags? I don’t think I see this with regular post, only seems to be in MemberPress pages?

Post count: 35449

Hi,

Usually allowed memory size is when the wp memory limit is to low, make sure that you have set the theme requirements as in our guide -> https://forum.tagdiv.com/requirements-for-newspaper/ also because you have some many tags is possible to need at list double of wp memory limit.

Hope this will help you!
Let me know the results!

Post count: 104

Calin, I think I am good on memory, my memory limit on this server is 500MB for PHP scripts, I do some heavy lifting, the overall server is an 8gig memory, I think it is a bug with Memberpress, but is there a way to turn it off, I am not sure if the “Custom Post Type – Layout Settings” is a WordPress native thing or newspaper theme. Just trying to figure out how to remove, if nothing more then testing. Thanks.

Post count: 104

So I guess I am looking for something like this:

function custom_remove_meta_box() {
remove_meta_box(‘icl_div’, ‘post’, ‘side’);
remove_meta_box( ‘icl_div_config’, ‘post’, ‘normal’ );
}
add_action( ‘admin_head’, ‘custom_remove_meta_box’, 11 );

But not sure how to adapt this to newspaper theme?

Post count: 104

Found it!
add_action(‘add_meta_boxes’, ‘remove_meta_boxes’);
function remove_meta_boxes(){
remove_meta_box( ‘td_post_theme_settings_metabox’, ‘mp-reminder’, ‘normal’ );
}

Post count: 104

Though would just like to remove the CPT completely has it is still causing PHP to crash from out of memory, I am just adding lines to remove all the CPT from all my plugins.

Post count: 35449

Hi,

Maybe the only thing that can solve this problem is to remove the code for Custom Post Type – Layout Settings from theme files.

Thank you!

Post count: 104

How would I do that?

Post count: 35449

Hi,
You can do this be comment some code in theme files -> https://i.imgur.com/Meh6WBg.png the file path is wp-content/plugins/td-composer/legacy/common/wp_booster/wp-admin/content-metaboxes/td_templates_settings.php
But I’m not sure that this will improve or not the situation.
Let me know the results!

Post count: 104

That did it, now I just wish I had a button to enable or disable CPT. Will have to remember to apply this fix to the next update.

Post count: 104

I believe this issue is related to too many TAGS which I have 3,200 and need to clean, as I got them through an import from the previous system.

Post count: 35449

Hi,

I think that you can achieve a button for enable or disable CPT, you need to set some conditions and these to be tiger by an theme option or something, but this require some more skills that I have to can help you, sorry! Also just like you said, this implementation will need to be made after each them update.

As for the tags, I do not know, it can be a cause, but I cannot say for sure.

Thank you!

Viewing 13 posts - 1 through 13 (of 13 total)
The forum ‘Newspaper’ is closed to new topics and replies.