Hi Christian,
Hope all is well!
I've recently added "Admin Columns Pro" plugin to our WordPress in the hopes that we could bulk change the Divi Page Template that is being used for 335 Custom Posts the I've imported (Brand Facts). Unfortunately, Page Template does not see to be an option for this post type. I've tried doing this directly through Admin Columns Pro and I reached out to their support team. However, they have stated that some options are not available to all content.
I have two questions,
1. Can I add "Page Template" to the custom post type?
2. If not, is there another way to bulk edit the page template for our Brand Fact custom post type so that they all change to full width? (Ideally, I do not want to do this with CSS or PHP, but rather find a way to actually change what template is specified for each post).
Thanks so much in advance for your help.
Cheers,
Laura
Unfortunately, Page Template does not see to be an option for this post type.
Hi! When using Divi, you can add some code to your child theme's functions.php file that will enable the "Page Layout" options for any custom post type you specify. Assuming your post type slug is brand-fact:
function my_et_builder_post_types( $post_types ) {
$post_types[] = 'brand-fact';
return $post_types;
}
add_filter( 'et_builder_post_types', 'my_et_builder_post_types');
add_filter( 'et_fb_post_types', 'my_et_builder_post_types');
Copy and paste this line as many times as you would like to display Page Layout options on different custom post types.
$post_types[] = 'brand-fact';
However, I'm not sure if this will make the Page Layout option appear with the columns plugin. As far as bulk updating, that's something you would need to ask Divi about, since the Page Layout option is part of their software. I think you would have to come up with a custom SQL query that sets some postmeta value for each post to define the chosen page layout.
Thanks Christian,
I've looked into Divi's support forum and I've already seen that bulk changing the page layout is not an option. Can you clarify what exactly the code you provided does? I've put it in the child theme's funstions.php file, but not exactly sure what the change is that I should be looking for.
FYI, the slug for Brand Facts custom post type is "brand_facts" which I did change before adding it to my funstions.php file.
Thanks again.
The code I provided enables the "Divi Post Settings" panel in the post editor screen for custom post types. This is where you can choose a different Page Layout for each post. I'm attaching a screenshot here.
Thanks Christian,
What's interesting, is that panel was already displaying for my custom post types.
Cheers,
Laura