Skip to content
New issue

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

Use get_the_archive_description in hybrid_get_loop_description? #108

Closed
robneu opened this issue May 27, 2015 · 2 comments
Closed

Use get_the_archive_description in hybrid_get_loop_description? #108

robneu opened this issue May 27, 2015 · 2 comments

Comments

@robneu
Copy link
Contributor

robneu commented May 27, 2015

I ran into an issue where a plugin is filtering get_the_archive_description to inject content into archives and it doesn't work with Hybrid Core out of the box. I was able to work around it by filtering hybrid_get_loop_description like this:

add_filter( 'hybrid_loop_description', 'prefix_cpt_archive_description' );
function prefix_cpt_archive_description( $loop_desc ) {
    if ( ! is_post_type_archive() ) {
        return $loop_desc;
    }
    return get_the_archive_description();
}

It works fine, but it seems like a place where Hybrid Core could use a new core template tag and improve support for plugins using it. I'm not 100% sure if this could cause other issues, but I will submit a PR if you like.

@justintadlock
Copy link
Member

Are you testing against bce17a2?

The hybrid_loop_*() functions were dropped in favor of the_archive_title() and the_archive_description().

@robneu
Copy link
Contributor Author

robneu commented Jun 2, 2015

Ah, nope the site in question is using 2.0.4. Sorry for the confusion.

@robneu robneu closed this as completed Jun 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants