Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Why this plugin breaks blog page? WordPress

  • SOLVED

https://github.com/Astoundify/edd-single-product-home

Answers (1)

2014-02-26

Sébastien | French WordpressDesigner answers:

In this plugin, there is a mistake at line 59

is_home() return true when on the posts list page, This is usually the page that shows the latest 10 posts.
is_front_page() returns true if the user is on the page or page of posts that is set to the front page on Settings->Reading->Front page displays

So, in this code, is_home is not the good solution, you must use is_front_page
if ( ! $query->is_main_query() || is_admin() || ! ( $query->is_front_page || ( isset( $query->query_vars[ 'page_id' ] ) && $query->query_vars[ 'page_id' ] == get_option( 'page_on_front' ) ) ) )
return;



tomaso1980 comments:

It works!