Tuesday, October 18, 2022
HomeWordPress Developmentcustomized submit sorts - Searching for recommendation learn how to method constructing...

customized submit sorts – Searching for recommendation learn how to method constructing a WordPress plug-in


I do construct WordPress websites and plug-ins, although I take into account myself extra of a PHP developer, and that is how my thoughts thinks first, not instantly figuring out quite a lot of the accessible WordPress features.

I must construct a customized plug-in for a shopper, so as to add the power to host on-line contests. The precise contest components I am good with, as that shall be PHP, however I am making an attempt to determine one of the best ways to interface the contests with WordPress. The URLs shall be like…

sitename.com/contest-name/ – most present contest (will present both voting or outcomes relying on standing)

sitename.com/contest-name/2021/ – previous contest (will present outcomes)

There are three several types of contests –

- Single-category: All entrants are competing in opposition to one another
- Multi-category: Entrants are competing in opposition to others in the identical class
- Survey: The competition is closed to the general public and voters are authenticated

My first thought was to do all of it in PHP, however then I assumed for the URL construction, possibly every contest must be a customized submit sort “contest”. However then I went down the rabbit gap questioning if every year must be a separate submit, or ought to I’ve contest-X be a submit of sort “contest” after which deal with the person years with customized PHP.

Additionally… the place would I specify the kind of contest? I’d simply need to restrict it to the three sorts, and require that every contest have a kind specified. Post_meta might be the place for it, however it’s larger degree than even the title, so I used to be contemplating placing it in an unused subject proper within the posts desk (post_excerpt?).

I additionally thought-about making it shortcodes, and the shopper can simply make a brand new web page with the URL they need and put in shortcodes for the competition. Although that will require extra work from the shopper that I hoped the plug-in would streamline.

I am positive there are different WordPress methods to method this as properly. I can actually code it in any of them, I am simply discovering myself second guessing “What if I spend weeks engaged on it a method and notice it could have been a lot better to do it this different manner?”.

Is there an method that extra skilled WordPress builders would agree “That is the way in which to method it”?

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments