ThemeForest

Standardized Custom Post Type Naming

1266 posts Chris Robinson
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • United States
  • Referred between 200 and 499 users
contempoinc says

This article from Konstantin about the “Lock in Effect” in WordPress themes got me thinking a lil’ bit.

Theres many things he outlines but one we can solve simply is CPT naming, most themes feature at least one CPT most commonly a portfolio. Now its up to the author to name this CPT which can be anything from “portfolio” (like myself) to a prefixed name like “ct_portfolio”, etc…

This can be troublesome for buyers as they purchase one theme, add their content, then maybe down the road purchase another but this new theme uses a prefixed name for the portfolio so that user now has to either re-input all their content or do a SQL UPDATE command.

So I’m proposing something simple at least for the authors on TF, lets standardize our CPT naming.

Proposed examples:

  • portfolio
  • testimonials
  • products
  • slider
  • etc…

Thoughts?

4 months ago
2094 posts
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Grew a moustache for the Envato Movember competition
  • Most Wanted Bounty Winner
  • Community Moderator
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • United States
  • Referred between 500 and 999 users
sevenspark says

I read the same article this morning and was thinking along the same lines. Going hand in hand with this, I think plugin authors should then namespace their custom post types so as to avoid collisions.

So I think it’s a good idea; but on the other hand, it doesn’t do much good for meta fields, since those would be more problematic (impossible?) to standardize.

In general: standards are good :) It’d be great if WordPress would actually adopt an official stance on the matter, and offer a best practice standard, actually.

4 months ago
sevenspark is a moderator
2389 posts Put a Donk On It
  • Has been a member for 2-3 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Contributed a Tutorial to a Tuts+ Site
  • Interviewed on the Envato Notes blog
  • Beta Tester
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • United Kingdom
  • Referred between 50 and 99 users
ThemeProvince says

I think its this and the slug used that needs to be standardised. People use the permalink /portfolio on a page with a theme where that slug is reserved for portfolio posts etc. and therefore generates a 404 error. I’m too lazy to change the slugs myself but i’d encourage others to change this.

4 months ago
1266 posts Chris Robinson
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • United States
  • Referred between 200 and 499 users
contempoinc says
sevenspark said
So I think it’s a good idea; but on the other hand, it doesn’t do much good for meta fields, since those would be more problematic (impossible?) to standardize.

Agreed, this is just one piece to the puzzle, custom taxonomies and metaboxes are a whole nother story. Although you could propose a small standardized set for different uses, like for products (price, size, shipping, etc…).

4 months ago
2211 posts
  • Has been a member for 1-2 years
  • Exclusive Author
  • Sold between 1 and 100 dollars
  • Bought between 10 and 49 items
  • United States
OrganicBeeMedia says

I also agree, I think another thing that should be standardized is shortcodes / standard widgets though I think for some of that would be impossible

4 months ago
9 posts
  • Has been a member for 1-2 years
  • Exclusive Author
  • Sold between 50 000 and 100 000 dollars
  • Elite Author
  • Bought between 1 and 9 items
  • United States
  • Referred between 10 and 49 users
wearepixel8 says

Some form of standardization is definitely a step in the right direction. The true trick is to get everyone to embrace the idea without thinking they are compromising their product in some way.

Count us in!

4 months ago
1266 posts Chris Robinson
  • Has been a member for 3-4 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Author had a File in an Envato Bundle
  • Interviewed on the Envato Notes blog
  • Author had a Free File of the Month
  • Exclusive Author
  • Sold between 100 000 and 250 000 dollars
  • Elite Author
  • Bought between 10 and 49 items
  • United States
  • Referred between 200 and 499 users
contempoinc says

Really the way to get this to work is getting Envato behind it, setting a standard and making it apart of the review process.

Calling all staffers…

4 months ago
137 posts
  • Has been a member for 1-2 years
  • Exclusive Author
kaaz says
contempoinc said
Really the way to get this to work is getting Envato behind it, setting a standard and making it apart of the review process. Calling all staffers…
+1
4 months ago
by
by
by
by
by