Support » Theme: Zoom Lite » Bug Fix: “This entry was posted in” for custom post types

  • Hi Zoom-Lite developers,

    I noticed that the “The entry was posted in” functionality doesn’t work for custom post types/taxonomies – it only works for ‘standard’ posts. It’s straightforward to fix – in inc/theme-loop.php, you can modify the first few lines of the zoom_single_post_meta() code to be:

    function zoom_single_post_meta() {
    			global $post, $post_id;
    
    			$post_type = $post->post_type;
        		// get post type taxonomies
        		$taxonomies = get_object_taxonomies($post_type);
    
    			$taxonomy = $taxonomies[0];
    			$category_list = get_the_term_list( $post_id, $taxonomy, '', esc_html__( ', ', 'zoom-lite' ) );
    			
    			/* translators: used between list items, there is a space after the comma */
    			$tag_list = get_the_tag_list( '', ', ' );

    and it seems to work pretty well. You might want to include this fix in a future release.

    • This topic was modified 1 year, 2 months ago by Webreaper.
  • The topic ‘Bug Fix: “This entry was posted in” for custom post types’ is closed to new replies.