Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • It seems that all you need is a taxonomy instead of a custom post type or a combination of both.

    If you register a taxonomy called faq and create a template taxonomy-faq.php, the query on that template would loop through all the posts from current taxonomy term. In other words, under the url site.com/faq/common-questions you would get all the posts with a term ‘common-questions’ from taxonomy ‘faq’ attached.

    To show a list of faq categories with that approach you would have to use get_terms() function.

    Hi,

    print_r() turns boolean values into strings, TRUE is returned as “1” and FALSE as empty string “”. It’s possible that update_post_meta() returns FALSE in your case (which, according to documentation would happen If the meta_value passed to this function is the same as the value that is already in the database). Obviously you wouldn’t see empty string on your page, try using var_dump( $value ) instead of print_r($value).

Viewing 2 replies - 1 through 2 (of 2 total)