We are trying to mass import a custom post type with a custom Toolset Access Post Group.
We have our post groups set. The custom post group names do not correlate to the viewable name from the admin panel. So it makes it very hard for our team to be able to find the right custom post group name to use to import.
Example:
1. Toolset Viewable Custom Post Group Name: session257
2. What shows on an export and the only way we can get it to import is to use: wpcf-custom-group-21a060f529b2482c2c461b345672bb22
I would hope and have unsuccessfully tested to try to import: wpcf-custom-group-session257 into the post custom field _wpcf_access_group
Am I missing something here on an easy way to import Post Group assignments?
If this is impossible, is there at least a way I could write some code to display this long unique custom name somewhere viewable and which Admin Name it correlates to. This way we could easily see either in the Post Group settings tab or on a custom page what unique name we need to use for each post group we have created.
Thanks!
Hello,
It needs custom codes, for example, below custom shortcode can convert a Access post group name to group slug:
add_shortcode('access_name2slug',function($atts, $content){
$atts = shortcode_atts( array(
'name' => '',
), $atts );
$access_settings = get_option( 'toolset-access-options' );
$res = '';
if(isset($access_settings->types)){
foreach($access_settings->types as $k => $v){
if(isset($v['title']) && $v['title'] == $atts['name']){
$res = $k;
break;
}
}
}
return $res;
});
Use above shortcode, like this:
[access_name2slug name="test access group 1"]
Thanks so much for the assistance. For our situation we are trying to make it easy for our end user admins to see the unique name either on an admin page or directly on the post group settings page. That way they can easily copy and paste the unique toolset post group name into a CSV so they can mass import some custom posts. Is there a way to add the unique post group name in the toolset access post group settings tab?
No, there isn't such kind of built-in feature, but you can add a feature request for it:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/
And you can get the slug from HTML source codes, see my screenshot: access-slug.JPG