118 reputation
5
bio website
location
age
visits member for 2 years, 8 months
seen Jun 11 at 16:26

Jan
3
asked Merge multiple menus into single dropdown menu
Jun
20
comment Woocommerce Sorting does not sort the results after page reload
Yes, it seems to be WooCommerce specific. I am still trying to figure out how to do this. And I do appreciate your efforts so far in helping me through. If I figure out how to do this, I will let you know. Meanwhile, if you have any ideas, please add. Thanks.
Jun
19
comment Woocommerce Sorting does not sort the results after page reload
If I remove the line $wp_query = new WP_Query($args);, it gives me the error: " Fatal error: Call to a member function is_visible() on a non-object in..." So this means that I have to explicitly instantiate an object before using it in the loop. If I use $wp_query = new WP_Query();, this won't show any products at all as it needs 'post_type' => 'product', in the args. So this means I am stuck with having to use $wp_query = new WP_Query($args);. Even if I pass the post_type argument & have the pre_get_posts set the other arguments, it still does not sort!!! So complicated!!!
Jun
18
comment Woocommerce Sorting does not sort the results after page reload
Now I modified the function in functions.php to the following with no effect: function den_filter_query( $wp_query ) { global $wp_query; $wp_query->set( 'post_type', 'product' ); $wp_query->set( 'orderby', 'meta_value_num' ); $wp_query->set( 'order', 'desc' ); $wp_query->set( 'meta_key', '_price' ); } add_action('pre_get_posts', 'den_filter_query');
Jun
18
comment Woocommerce Sorting does not sort the results after page reload
So now I took off the arguments in index.php and modified it to: <?php $wp_query = new WP_Query(); ?> The rest of the code is same in index.php. Modified the function in functions.php to function den_filter_query( $wp_query ) { $wp_query->set( 'orderby', $_GET['orderby'] ); }. Yet the result is the same!!!
Jun
18
comment Woocommerce Sorting does not sort the results after page reload
It is being called in the index.php, so I assume, is_home() would be true. I didn't change anything in the query (in index.php) so far. $_GET['orderby'] is the value that we receive from the URL, so I am assuming that's correct.
Jun
18
comment Woocommerce Sorting does not sort the results after page reload
Here is my revised function, but still no effect: function den_filter_query( $wp_query ) { if( $wp_query->is_home() && $wp_query->is_main_query() ) { $wp_query->set( 'orderby', $_GET['orderby'] ); } } add_action('pre_get_posts', 'den_filter_query');
Jun
18
comment Woocommerce Sorting does not sort the results after page reload
I have added the following code in functions.php but no effect: function den_filter_query() { if( is_front_page() && is_main_query() ) { global $args, $wp_query; $args = array( 'post_type' => 'product', 'orderby' => $_GET['orderby'], ); } } add_action('pre_get_posts', 'den_filter_query');
Jun
17
asked Woocommerce Sorting does not sort the results after page reload
Jun
15
awarded  Commentator
Jun
15
comment Pagination work! But title still says “Page Not Found”
Hi, I have the exact same problem. Can you please share the solution? Thanks.
Jun
14
comment Woocommerce custom loop to show all the products
Hey, did you ever find an answer for this? If yes, please share. That will be highly appreciated. Thanks.
Feb
25
comment Using Wordpress 3.5 Media Uploader in meta box?
Thank you sooooooooooooooooooo much!!!! This finally worked after 2 days of desperate hunting for the solution!!! Thanks a ton!!!
Feb
24
awarded  Tumbleweed
Nov
24
comment How to use wp_nav_menu to create a select menu dropdown?
Yes, it does work. Working as of Nov 24, 2012. Cut & paste the "wp_nav_menu(array( ..." part in you theme, where you want the dropdown to appear. DO NOT leave it in functions.php file. If you do, the dropdown will end up appearing when functions.php is called & so it may appear at the top of the actual content, which is undesirable. So simply copy the function to functions.php file & copy wp_nav_menu where you want it to appear, save both files & reload page. That should do it. And I am using WP3+ version, so make sure you update your WP version. It may NOT work on older version.
Nov
16
comment How to add a class to the comment submit button?
Alex, Taylor is right. NEVER modify core files! NEVER EVER!
Nov
16
comment How to add a class to the comment submit button?
With all due respect, I disagree. I have a website+blog. I have defined a class & used it for all the buttons. Also I have different states for the buttons (normal, hover). If I were to not apply a class to the comment button, then that would mean that I have to target the blog comment button by ID and start adding the selector right next to the already defined class (comma separated). That means, I am unable to make use of already defined class & this is not preferred. Simply applying the class name to button makes life all the more easy without having me to add ID manually & keeps it simple.
Oct
15
comment Show comments fields in two columns
I implemented your solution & it looked like I am doing something wrong & hence I could not get the results. So I did find an online resource that shows you the almost exact same code that I am using for showing the comment_form. Please refer to this page: codex.wordpress.org/Function_Reference/comment_form I am using $fields = array('author' => ...); If you can let me know how to implement your solution to the style of coding indicated by the code in the above page, that will be really helpful.
Oct
11
comment Show comments fields in two columns
Thanks for the reply. My theme does not have a comments.php file. Rather, the code is written in functions.php file to populate the form with custom fields. So in this case, what can be done to separate them?
Oct
10
asked Show comments fields in two columns