Closed anteksiler closed 6 years ago
More information is required.
Hi there, what kind of information do you want?
I am loading the posts via ajax using:
$args = array( 'p' => $previous_post->ID, 'no_found_rows' => true, 'posts_per_page' => 1, 'post_status' => 'publish' ); $query = new WP_Query($args);
Using this in an infinite post style, where previous article is loaded when you reach the end of the page.
I need step-by-step information on how to recreate the issue.
Generally speaking, it'd be up to you to write the code to "reload" the breadcrumbs for a custom, Ajax-based system. I imagine it'd be impossible for BT to detect custom systems from themes/plugins. If it's something that I think would be a good fit for BT, I'd certainly consider it.
I am getting the whole post content on Ajax, so it is not a javascript based system where I load certain parts.
Every content of the post is correct, except for the breadcrumbs. It is in a reqular WP_Query.
I am not sure why it is failing. You are getting the correct ID using:
$post = get_queried_object(); $post_id = get_queried_object_id();
Actually, the below code is not triggered:
elseif ( is_singular() ) { $this->add_singular_items(); }
You can view it here: http://ftgoodlife.staging.wpengine.com/entertainment/tamar-braxton-joins-nick-carter-chaka-khan-andy-grammer-on-dancing-with-the-stars/ Just scroll bottom and let the next article load.
If you've got a theme Git/SVN repo to point me to, I'd be happy to take a look when I get some free time. Or, if you can describe in full detail the steps (with code) I need to recreate the issue, that's OK too.
Outside of that, this ticket is pretty much dead in the water.
I think I solved the issue. Since it's an ajax call, it is not singular, it is from Admin. So change the line to:
elseif ( is_singular() || is_admin()) {
When the breadcrumb is in a ajax loaded post, it only displays 'Home'.