John
Forum Replies Created
-
Forum: Plugins
In reply to: [osTicket WP Bridge] Remove page sidebar?I have the same question / issue – my theme’s (Divi) sidebar is trying to be displayed but its wrapping around. The theme has the option for “full page” which makes this sidebar go away when creating a page through normal process. What is the recommended way to provide the same instructions to the theme for not showing the sidebar (full page) for the osTicket pages?
Forum: Plugins
In reply to: [Products Per Page for WooCommerce] Can't get it working!Sormano, How do you want me to contact you?
Forum: Plugins
In reply to: [Products Per Page for WooCommerce] Can't get it working!I tried your suggestion 4 and it did appear to change the fact that before I was only seeing some partial list (I have 8 products and I was only seeing 5 before) – so the obscure 5 limit is gone now. Now I see all 8 on one page. However, returning to be able to control products per page (i.e. changing it to 4) or trying to change the columns per page (i.e changing it to 2) still has no affect (either change). I am baffled.
Forum: Plugins
In reply to: [Products Per Page for WooCommerce] Can't get it working!I’ve attempted to poke around a little at this, as a inexperienced WordPress developer, and I pushed some buttons and things started happening.. but not certain I’ve determined a solution yet.
I noticed that not only is this plugin not affecting the posts per page, but also the main Settings > Reading post number values have no affect either.
I went into the Divi theme’s “custom_functions.php” and found this
add_action( 'pre_get_posts', 'et_custom_posts_per_page' ); function et_custom_posts_per_page( $query = false ) { global $shortname; if ( is_admin() ) return; if ( ! is_a( $query, 'WP_Query' ) || ! $query->is_main_query() ) return; if ( $query->is_category ) { $query->set( 'posts_per_page', (int) et_get_option( $shortname . '_catnum_posts', '10' ) ); } elseif ( $query->is_tag ) { $query->set( 'posts_per_page', (int) et_get_option( $shortname . '_tagnum_posts', '10' ) ); } elseif ( $query->is_search ) { if ( isset($_GET['et_searchform_submit']) ) { $postTypes = array(); if ( !isset($_GET['et-inc-posts']) && !isset($_GET['et-inc-pages']) ) $postTypes = array('post'); if ( isset($_GET['et-inc-pages']) ) $postTypes = array('page'); if ( isset($_GET['et-inc-posts']) ) $postTypes[] = 'post'; $query->set( 'post_type', $postTypes ); if ( isset( $_GET['et-month-choice'] ) && $_GET['et-month-choice'] != 'no-choice' ) { $et_year = substr($_GET['et-month-choice'],0,4); $et_month = substr($_GET['et-month-choice'], 4, strlen($_GET['et-month-choice'])-4); $query->set( 'year', absint($et_year) ); $query->set( 'monthnum', absint($et_month) ); } if ( isset( $_GET['et-cat'] ) && $_GET['et-cat'] != 0 ) $query->set( 'cat', absint($_GET['et-cat']) ); } $query->set( 'posts_per_page', (int) et_get_option( $shortname . '_searchnum_posts', '10' ) ); } elseif ( $query->is_archive ) { $query->set( 'posts_per_page', (int) et_get_option( $shortname . '_archivenum_posts', '10' ) ); } }I modified the function to immediately execute this
$query->set( 'posts_per_page', '6' ); return;and now I see 6 products in my page.
This doesn’t tell me why the other settings and the plugin values are being ignored (and they still are being ignored) but it did seem to change things …
I am not sure if this is completely useless information for trying to solve this problem but thought I would share before I call it a night.
Hopefully this can be fixed.
Forum: Plugins
In reply to: [Products Per Page for WooCommerce] Can't get it working!I am using the Divi theme from ElegantThemes.
Forum: Plugins
In reply to: [Products Per Page for WooCommerce] Can't get it working!This is not working for me either.
An interesting note is that I first installed another plugin, WooCommerce Product Archive Customiser, and it is supposed to handle “products per page” also and it also did not work. I disabled it before I tried installing this one.
Perhaps there is a change in a recent version of WooCommerce that is causing both plugins to fail?
Maybe its another plugin I have that is causing both plugins to fail?
Any ideas?