SOLVED: Invalid Post Type

Hello @timmse,
Things are getting very strange. After opening a template once from the template menu within Bricks (not from the Wordpress Bricks template menu), I can now open all templates again from the Wordpress Bricks template menu.

I deactivated all plugins and opening the template worked again. One of the last plugins was Custom Post Type UI but not sure as I deactivated several plugins at once.

Everything worked fine after reactivating all plugins again. Bricks 1.70

Hey guys,
As far as I can see there is no issue anymore. Basically, your problems probably came from incorrect rewrite rules like “/” or not saving permalinks after significant changes that can’t be tracked after the fact.

So, whenever you have “Invalid post types”, make sure to (one thing at a time):

  • resave your permalinks
  • remove custom PHP redirects
  • disable plugins
  • check .htaccess for custom redirects

Best regards,
timmse

Hello, we have created a custom post type (landingpage) and would like to remove the slug. We had used the below rewrite rule.

i.e
$rewrite = array(
‘slug’ => ‘/’,
‘with_front’ => false,
);

However, this break the template access in bricks. How would you suggest removing the slug without breaking bricks builder.

Hey gang, I just encountered this same issue. I actually don’t have a single plugin on my site. I read this thread, went to the permalinks setting and simply resaved and it was fixed. Probably not much help, but thought I’d drop a comment.

1 Like

Hi there, I have the same issue for two pages when I try to edit in Bricks. I found some categories have the same url as the pages with problem. After I have renamed one of my category with a different slug url and saved permalinks and clear cache worked. I have to try harder for second page. For moment looks like I still have to clear cache properly. I hope this may fix the problem for some people. Check the url to don’t have the same name.

1 Like

Did you notice this is happening as well after moving a website?

It happened after I moved the website from development to the production domain using Duplicator plugin to backup and restore (migrate) the website.

1 Like

I can confirm what @teddypetcu writes

In my case, the problem with the invalid post type message only occurred with the templates after I changed the PHP version in my LocalWP environment.
This probably also flashed the permalinks and thus the problem became apparent.

It was also the case with me that my category base and a category had the same name.
After I changed the name of my category base slug it worked again

1 Like

Hi guys,

I had the same issue today and fixed it.
First I tried to reset the permalink settings and this didn’t work.

My page was a child-page and as soon as I removed the child/parent link it started to work.
Not sure though why it wasn’t working when the page was a child of another page.

1 Like