I am in my early stage on learning wp development and tried something "simple".

To manage some custom entities in my back-end and try to display them in front-end. So what i did was:

  • Created custom post type , custom taxonomies
  • Created custom fields for all the stuff i need to keep
  • Created page template for showing an index of my stuff
  • Created a single template that displays one entity.

But i would like NOT to be dependent from the current template i use. What are the ways to achieve this? Should i create a plugin with shortcodes that output what i need? or something else?

Additional Info:

For example lets say that i need to display a paginated list of custom post types. One way to do it is to create a page with a custom page template and do the work there. This is coupled with template. Another approach would be to create a plugin and in there to create a shortcode. Then i can create a page template based on whatever template i have installed and use the short code in there to get the table.

What i ask is what wordpress development paradigm dictates in order to separate the concerns..

  • 1
    Long story short, yes, create a plugin! – TheDeadMedic Oct 26 '15 at 16:25
  • So, i use the templates' tools to create the pages and post types templates and then i use only plugins with shortcodes / actions / filters ? Will i be able to create an application by these? – e4rthdog Oct 26 '15 at 18:10
  • 2
    The answer would depend greatly on what you mean by "I would like NOT to be dependent from the current template I use". If you can describe a use case or specific scenario you will likely get a very useful answer from a community member. – jdm2112 Oct 26 '15 at 18:45
  • 1
    I'm confused by what you mean by not to be dependent from the current template, can you give examples of what is happening that you don't want, and examples of things you would like to do that you can't currently? Are you talking about pages that have no post or category/archive associated with them? – Tom J Nowell Oct 26 '15 at 19:18
  • Added additional info with an example – e4rthdog Oct 27 '15 at 5:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.