We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The post meta is displaying (or not) based on the first post in the loop.
The post meta display should always be based on the individual post type.
This is happening because we're checking get_post_type() in the wp hook, which will grab the post type of the first post only.
get_post_type()
wp
A potential solution:
add_action( 'generate_before_content', function() { if ( is_search() ) { $header_items = generate_get_header_entry_meta_items(); $header_post_types = apply_filters( 'generate_entry_meta_post_types', array( 'post', ) ); if ( ! in_array( get_post_type(), $header_post_types ) && ! empty( $header_items ) ) { remove_action( 'generate_after_entry_title', 'generate_post_meta' ); } } } );
https://generate.support/topic/last-updated-date-in-internal-search-results/#post-28191 https://generate.support/topic/last-updated-date-in-internal-search-results/page/2/#post-28405
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
The post meta is displaying (or not) based on the first post in the loop.
Steps to reproduce
Actual behavior
Expected behavior
The post meta display should always be based on the individual post type.
This is happening because we're checking
get_post_type()
in thewp
hook, which will grab the post type of the first post only.A potential solution:
References
https://generate.support/topic/last-updated-date-in-internal-search-results/#post-28191
https://generate.support/topic/last-updated-date-in-internal-search-results/page/2/#post-28405
The text was updated successfully, but these errors were encountered: