Hello,
Tested with version 2.8.3 updated this weekend, editor width works for CPTs.
The link below allows you to download the display-slug-CPT file whose code is that of the Editor Custom Color Palette extension.
This code is to be put in the functions.php file of a child theme.
it will display directly in Front end the slugs of the CPTs of your site.
Check that your CPT slug is present.
If so, the editor width should work for CPTs.
To be confirmed for example with the extension: Find My Custom Post Types.
Display slug CPT
Thread Starter
Li-An
(@li-an)
I have an error with your code but as I have other custom post types, I checked them and width is correct.
The one with the problem is the only one managed by https://ww.wp.xz.cn/plugins/custom-post-type-ui/
Please take a screenshot of your error with the CPT UI extension
Thread Starter
Li-An
(@li-an)
The error
Une erreur de type E_COMPILE_ERROR a été causée dans la ligne 9 du fichier /home/xxx/www/li-an/blog/wp-content/themes/blocksy-child/functions.php. Message d’erreur : Cannot redeclare eccp_get_registered_post_types() (previously declared in /home/jmmeyer00/www/li-an/blog/wp-content/plugins/editor-custom-color-palette/editor-custom-color-palette.php:12692)
hello, sorry display-slug-CPT.php updated to correct your error. code to replace with this new one in your function.php file
here is the new link of modified display-slug-CPT.php file, tested OK
Display Slug
Thread Starter
Li-An
(@li-an)
Here is the message
Array ( [comic] => comic [portfolio] => portfolio )
the one with the problem is portfolio
The CPT portfolio is established with the CPT UI extension, right?
I have the haibtude to establish my CPT with code, so I will create the same CPT with CPT UI and I look if there is a problem.
Thread Starter
Li-An
(@li-an)
That’s right :portfolio CPT is managed by CPT UI. It’s the first time I use it and it’s quite convenient.
Hello,
I created a custom post type with CPT UI and the OceanWP theme.
The width parameter is functional.
either you have a theme or CPT UI configuration problem
Check that you have activated REST API with the “show in rest” parameter for proper functioning of Gutenberg.
Thread Starter
Li-An
(@li-an)
I may try on a test site. Thanks for your support. Theme is Blocksy but as it works for other CPT, no reason it won’t work for this one. I don’t close the thread if I find a solution but I won’t bother you more.