Skip Navigation

[Resolved] How to display custom field group on specific page in admin

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to display custom field group on specific page in admin

Solution:
You can use WordPress function remove_meta_box() in order to remove the custom field group.

You can find the proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/post-field-group-not-saving-correctly/page/2/#post-1199207

Relevant Documentation:
https://codex.wordpress.org/Function_Reference/remove_meta_box

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 17 replies, has 5 voices.

Last updated by matthewL-7 5 years, 10 months ago.

Assisted by: Minesh.

Author
Posts
#921773
screenshot2.png
screenshot1.png

Hi

I am trying to create a post field group that displays on a specific template. See screenshot1 attached.

But then when I hit save it just forgets this setting. See screenshot2.

Is this a bug?

Thanks.

#921933

1. Does it work if you try to save anything else but the Template as condition, for example, to display the field group only on native post types?

If so, it is likely that you either migrated or somehow altered the Content Template ID.
That happens when you migrate a site, and after, those may present issues in that GUI, although the only problem I know of is that after migration you may have lost some settings there, if Content Templates where involved.
That can however be solved by re-saving them, so this would still be a new issue which I can currently not replicate

2. Does your Post Field group or any field/content template etc, involved here, hold any special characters in it's name/title?Special Characters may include Numbers, dash, other HTML syntax common characters, basically anything not-latin

If so, please remove those and try again.

If all that does not help, can you see if there are JS errors in the console, or PHP errors when you enable WP Debug, and if the issue as well persist when you disable all plugins but Toolset, and use a native WordPress theme?

If then the case is not solved I think we will need to have either specific steps on how to replicate it, or a copy of the site.
https://toolset.com/faq/provide-supporters-copy-site/

#922945

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - Thanks for access details.

could you please be specific which custom field group you want to display with which template so I can check further what might be he issue.

#923082

Hi

Of course.

The field group is called "TV Deal" and I want to load it just on "Deals Template"

Thanks.

#923455

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I see that the content template ID is same so no issue with that but this is really strange issue. I do not see with my local test site with minimum setup.

In order to minimize the cause of the issue:
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?

Do you see any difference while deactivating any third party plugin(s) or when you switch to default theme?

#923468

Hi

So I disabled every plugin but Toolset Types and Toolset Views. I then switched to theme Twenty Seventeen and had the same issue still 🙁

#923475

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Really strange. Do you see any error in error_log file?

To enable PHP debugging in WordPress, edit your wp-config.php file and add the following:

PHP Debugging in WP

ini_set('log_errors',TRUE);
ini_set('error_reporting', E_ALL);
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');

This produces a file error_log.txt in your WordPress root directory. Make sure that the web server can create and write this file. If it cannot, use an FTP program to create the file and make it writable to Apache (normally, the www-data user).

After this is enabled, all errors that occur when using your website’s front-end and backend, are logged into that error_log.txt file.

More info:
=> https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging

If then the case is not solved I need duplicator package of the site.
=> https://toolset.com/faq/provide-supporters-copy-site/

#923584

Hi

I have tried doing this but it doesn't seem to have written anything to the error_log.txt file, I manually made the file and gave it write permissions but nothing when I tried to repeat the action.

I noticed some errors relating to Toolset in the standard error_log file relating to PHP errors though should I send you this?

Also regarding the duplicator package for the site, how can I send you this I don't see a way to attach a file?

Thanks

#924044

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

You can follow the instructions given with the following link for duplicator package.
=> https://toolset.com/faq/provide-supporters-copy-site/

Upload duplicator package to google drive or other file sharing service and send us link to download it.

I have set the next reply to private which means only you and I have access to it.

#948232

Hello,

Thanks for the details, I can duplicate the same problem, and have escalated it, I will update this thread if there is any news.

#1090444

Hey

Any update on this bug being fixed? Been over a month now.

#1091025

Here is the feedback from our 2nd tier supporters:
It has been confirmed as an exception(it means the problem only exists in your database dump file) and escalated to our developers, our developers are working on it, I will update here if there is any news of fix for it.

#1193939

Hi Matthew,

This is to notify you that the issue is fixed in the latest Types, Views version.
Please backup your website, update WordPress, all Toolset plugins to the latest versions and check if the issue has been fixed.
It will be nice if we received a confirmation from you that the issue has been fixed.

Thanks.

#1194085

Hi Matthew,

Please let me know if you still need assistance for it, thanks

#1196360

Hmm I can't seem to see the option to set the fields to appear on the specific template anymore?

Maybe its still not working correctly?

I want the fields to only load up when I am editing a specific page in wordpress, is this possible? This page as a specific content template that only that page uses so I thought it was - but maybe it isn't?

I would have thought it was though this is something plugins like ACF have done for a while.

Cheers.