rwdoerr on "[Plugin: Custom Content Shortcode] Query Monitor - WP Comments with a lot of unnecessary queries"

ساخت وبلاگ

LOVE THIS PLUGIN! Great work!

I have a few loops running on a custom page (custom-page.php), here is an example:

<?php start_short(); ?>
[loop exists trim=true type=unit taxonomy=tax-name-one term=term-one relation=and taxonomy_2=tax-name-two term_2=term-two]
[the-loop]
... Some Mixed HTML [field custom_name escape=true] [title] etc...
[/loop]
<?php end_short(); ?>

When I use Query Monitor plugin, there are a TON of unnecessary "WP_Comment_Query->get_comment_ids()" queries.

Example:

SELECT wp_Idea.comment_ID
FROM wp_Idea
WHERE ( comment_approved = '1' )
AND comment_post_ID = 212
ORDER BY wp_Idea.comment_date_gmt DESC

There are 162 total queries on the (entire) page, with 72 of them being attributed to this WP_Comment_Query. Is there anyway in the shortcodes to pass an argument to disable looping through Idea?

When I looked through the Documentation, under the Advanced Markdown i.e. "if it exists" it lists a bunch of fields like Featured Image and if the post has any attachments, along with Idea. I would expect Featured Images and attachments would have the same unnecessary queries, but they don't, so I am suspecting that something is defaulting to always query Idea.

(The irony is that my site is 0 Idea, and Idea are disabled, so you can see why it's troubling me.)

Thanks for any help you can provide, and thanks for a great plugin!

https://wordpress.org/plugins/custom-content-shortcode/

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 79 تاريخ : سه شنبه 21 ارديبهشت 1395 ساعت: 2:57