I have a few sites where this has been causing an issue. For some reason, when the post get’s autosaved, all the buttons disable, but they don’t come back!
Initially what I had to do was inspect the element (publish button) and then remove the disabled class. But that’s annoying, and I can’t tell my clients to do that. So, I found a simple script to disable AutoSave.
How simple right!! Took me like an hour to find that stupid thing =). Hope this helps someone, enjoy!
About the AuthorWhat's UP! This is my site, I write 99% of the articles on here. I'm also the owner of SureFireWebServices.com. I help out a lot of developers and designers getting into the web game. Helping is fun for me, so feel free to ask me any questions! I've made courses and have a membership as well to help get you on your feet!
You Might also like
By Jonathan Perez — 3 years ago
Many to many posts is a common problem that I keep running into with Types and so do a lot of others. The main question most people ask is “How the hell do you successfully run many to many posts with the Types and Views plugin?” Well to be honest, I’ve been developing for quite some time and it’s still a huge freakin’ pain to do, but I finally found a great way that will make life SO much easier for you in the future.
Why is many to many post relationships such a problem.
Well, for starters, by default Types only allows many to many relationships by hacking it. It’s not directly built into the software (not sure why as it’s been requested for years now). In their documents, they tell you that in order to make many to many relationship type posts, you need to add a third CPT (custom post type).
This is ridiculous because:
- It doesn’t really work in every situation.
- It’s incredibly sloppy.
- Who wants to manage a third post type?!
In order to manage these relationships, you have to create tertiary posts that link the 2 posts together. However, if you have “many to many” which is what’s needed, then you have to create a new post for every single relationship. Cumbersome? Yes
Doesn’t Types have Parent / Child Relations? Can’t you use that?
Here’s how parent / child relationships work in Types.
You have a house (Parent). That house has bedrooms(Child).
You can list as many bedrooms as you want in that house.
NOW, What if you have 2 houses that both have a living room. Not uncommon I’d say. Well, since each child post can only have 1 parent, you have to recreate that living room on the parent post. You can’t reuse child posts that were already created.
If you’re situation is more complex then that, then that’s going to leave you with A LOT of child posts. Now add that tertiary post in, and you can see how this can start getting very very messy.
Now I’m pretty new with this plugin but I did some digging and it truly is the definition of many to many relationships. I think the problem most people have is that it involves a little bit of code. Don’t be scared though, it’s really easy.
If we go back to the house/room example, you can make the living room once, and then just link it to every house if you need without having to constantly recreate the same post over and over. The same works vice versa, create a room, and link it to as many houses as you want.
Here’s the magic that puts it all together, and you can also find this on the P2P documentation page.
First you have to set up the actual posts that need to be related:
[gist id=”4987734d263072362ad9″ file=”p2p_setup.php”]
Then you need to display it
[gist id=”4987734d263072362ad9″ file=”display_p2p.php”]
In the above example I used WooCommerce, so this specific loop hooks into the product summary, but you can literally hook it anywhere you’re theme allows.
That’s it! Now you have access to all the posts in a clean simple format, and they’ll display however you choose.
In my next post, I’ll show you how to actually set up the Views plugin to display the related posts.Post Views: 367
By Jonathan Perez — 6 years ago
So I was working on a project and I added a featured image to the post. There was also an image in the post directly (in the single page view — single.php). So low and behold when I went to the homepage I saw the featured image display perfectly how I wanted and then BAM! the same image right next to it. WHY??? Well I didn’t have anything that told wordpress to display the featured image on the home/archive/category page ONLY and not the images in the post!!!
Until now… Read MorePost Views: 1,807
By Jonathan Perez — 5 years agoThis tutorial uses Genesis Framework, Types, and mention of Views.
In this tutorial I’m going to show you how to create a check box that will show/hide content when checked. There will actually be 2 different ways to do it: one through PHP, and the other directly through Views. Read MorePost Views: 620