Save up to 39% on Bluehost Cloud Hosting and enjoy better performance!

Tag Archives: Custom Post Type

Dynamically Populate a Select field from Custom List

When we start using Custom Post Type & Custom Field to enrich our WordPress website, to meet various real world situation, building relationship between different datasets becomes a common practice. A simple example, is project & client relationship. If we manage this in database, we always link client to project using client ID, because client may repeat in multiple projects. If we use Custom Post Type to manage project and client in WordPress, the challenge is: how do we dynamically populate a latest client list into a client choices for a project?

Continue Reading →

Restore Custom Post Type from History that doesn’t have Revisions Enabled

I know the title sounds a little wired, here is the background story. WordPress has Revisions system stores a record of each saved draft or published update. It is enabled for Post & Page. But in Custom Post Type, Revisions support is up to the theme developer to enable it. As long as you use themes, you should have noticed that, in some themes, the revisions is disabled on Custom Post Type by default. When Custom Post Type is used for short content such as Testimonial, it isn’t much of trouble to restore a revision. But not for a CPT post with a lot of content.

Continue Reading →