0

I am just switching from MODx-CMS to Wordpress for some projects. In MODx you have resources, a resource can be be page, an article or for example a youtubevideo. You can sort those resources into folders and afterwards you can loop over those folders and display the resources or you can display a resource by id.

So for example I would like to show several youtubevideos at a section of my website and for each video I would like to define a videoid and a custom thumbnailimage. In MODx that's pretty straight forward, as I can declare custom fields (templatevariables) which belong to a certain template or resourcetype. So if I create a new resource with resourcetype youtubevideo I get the default fields like title, subtitle and also the custom fields (templatevariables) defined for that posttype.

As I am pretty new to wordpress I am asking myself if there's any way to do this in wordpress as well... I've read about custom fields but for me it seemed like the postauthor has to declare the keys himself while creating a post, which can be pretty buggy if he has a typo in the key.

So basically what I'd like to have are custom fields that are automatically shown if I create a new site in a specific category (for example if the category is "videos" I'd like to have a custom field for the id and a custom video thumbnail). Any suggestions or better solutions?

Thanks in advance! Fabian

2
  • what I'd like to have are custom fields which are custom fields... Can you please revisit your question to make it short and understandable.
    – Max Yudin
    Commented Feb 26, 2017 at 16:22
  • @MaxYudin Like so? The first two paragraphs are there to better explain my aim independently to the context
    – haeki
    Commented Feb 26, 2017 at 16:37

1 Answer 1

0

WordPress by default has custom fields aka "post meta" but apart from the UI you've already mentioned ("the postauthor has to declare the keys himself while creating a post") there is no UI functionality offered from core. You'll need a plugin for this.

Here is a nice comparison of custom fields plugins (Source: https://comparewp.org/)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.