Rewriting Post Info
-
I am trying to rewrite the post info for articles of a custom post type. I have this so far:
add_filter( 'genesis_post_info', 'custom_post_info' ); function custom_post_info ( $post_info ) { if ( is_singular( 'sermons' ) || is_post_type_archive( 'sermons' )) { $post_info = '[post_date] | [post_terms taxonomy="speaker" before=""] | [post_terms taxonomy="series" before=""] | [post_terms taxonomy="passage" before=""] '; } return $post_info; }The problem is that when one of the taxonomies are missing (i.e.series) it displays with an empty space. I would like to figure out how to write a function that writes a different post info when a taxonomy like “series” is null .
Any suggestions would be appreciated.
Chuck
The topic ‘Rewriting Post Info’ is closed to new replies.