Support » Themes and Templates » Automatically select format based on cat?

  • Hello, I am using a theme with 4 selectable formats, Standard,Gallery,Audio and Video. Your format selection adds an icon onto the homepage over the featured image.

    I was curious if there’s a tweak I can do so the template automatically selects the format based on the category the article has been posted under?

    For example I would click the video category, and by some magic wordpress would understand I wanted the video format.

    Someone have any information on this? Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • Category templates will take care of that for you.

    Chip Bennett


    Theme Review Admin

    “Post Format” and “Category” are both merely taxonomies. While you can certainly do what you’re wanting to do (not especially easily, mind you), I’m curious as to why you would want to use the same terms for two separate categories?

    What is it that you’re ultimately trying to accomplish with categories, that you are unable to do using Post Formats?

    Thanks jrav001, im going to look into this and test it out.

    Chip, I’ll attach an image to visually explain what i’m trying to accomplish.

    In the post/ post edit page you have your standard Category option (2.)
    The template i’m using has pre-set Format options (1.)

    The preset format options display an icon over the set featured image on the home page when selected (3b.), or not (3a.).

    The posts you see were automatically generated. However (3b.) I opened the post and selected the format option for video, which displays the icon.

    I would like to make wordpress associate the format ( 4 types ) with 4 categories, i.e. Posts under Video categories automatically have video format. Articles posted automatically have standard Format, etc etc.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Automatically select format based on cat?’ is closed to new replies.