• There’s a bug in twentytwenty_get_post_meta that prevents the action hooks twentytwenty_start_of_post_meta_list and twentytwenty_end_of_post_meta_list from displaying additional meta data when the default meta data fields are not populated.

    The variable $has_meta must be true for any meta to be displayed. It is set to false initially and is only set to true if one of the default meta are provided. For single-bottom, if no tags are in the post, $has_meta will be false regardless of additional meta attempting to be displayed by the action hooks.

    I solved the bug by defining $has_meta as a global inside twentytwenty_get_post_meta. From there, I was able to modify it’s value to true within my action hook function.

    Hope this can be fixed in the published version of the theme so I don’t have to use a hacked version.

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘twentytwenty_end_of_post_meta_list needs global $has_meta’ is closed to new replies.