Forums Forums Search & Filter Pro Modify Template to Switch Cases

Viewing 4 posts - 1 through 4 (of 4 total)
  • Trevor
    #193102

    Rather than:

    get_post_type( $post->ID )

    try

    get_post_type(get_the_ID())

    Anonymous
    #193108

    Hi Trevor, thanks for the prompt reply, however that’s not the issue. Please look at my stackexchange thread which explains what I am trying to achieve:

    https://wordpress.stackexchange.com/questions/318675/template-loop-add-switch-case-php

    Also another question, doesn’t your results.php need to have wp_reset_postdata(); for best practices?

    Trevor
    #193112

    It does not need it (wp_reset_postdata), no.

    Did you try it using get_the_ID()?

    Anonymous
    #193257

    no worries, i have figured this out.. 🙂

Viewing 4 posts - 1 through 4 (of 4 total)