0

I have a number of categories which are regions of the country (north, south, etc).

I would like to display some kind of info box at the end of each post which falls into one of these categories with an icons and links specific to that category, such as MAPS, HISTORY.

Each region category would have the same link names and icons, but each would direct to a different URL relevant to that category.

For instance

NORTH Maps - maps.com/north History - history.com/north

SOUTH Maps - maps.com/south History - history.com/south

Thought about creating a widget area, but it could become messy. Any better ideas?!?

1 Answer 1

0

There are multiple ways to print content on the front end. The "best" way depends on the details of the project and your description is very superficial.

The option I can think of are:

  1. Just edit the appropriate theme template to use has_category to display your links to the category URLs
  2. Do the same as above but use a filter on the_content to avoid editing the template files. Good if you may use multiple themes, not just one, or if this needs to be portable to other sites.
  3. Use a widget. This can be a bit trickier but I don't know about "messy".

Which is "best"? Or better than a widget? No idea. That depends on what you need to do, where you need to place the content, etc.

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.