gavra
Forum Replies Created
-
Forum: Plugins
In reply to: [Relevanssi - A Better Search] Filter WP_Query with custom fieldYup, this is what I ended up using thanks to your suggestion:
add_filter('relevanssi_modify_wp_query', 'modify_product_search'); function modify_product_search( $wp_query ) { // Get post type if ( ! empty( $_GET['type'] ) ) { $type = htmlentities( $_GET['type'] ); } if ( $type != 'articles' ) { // Default posts per page $posts_per_page = 12; // If post type is products // set posts per page to -1 if( $type == 'products' ) { $posts_per_page = -1; } $wp_query->query_vars['posts_per_page'] = $posts_per_page; $wp_query->query_vars['post_type'] = 'product'; $wp_query->query_vars['meta_key'] = 'product_is_preowned'; $wp_query->query_vars['meta_value'] = 'no'; } return $wp_query; }Forum: Plugins
In reply to: [WooCommerce] Disable "shop" pageThe client said so. I think that answers both your questions. 🙂
There are different pages that lead to a product where they can add it to cart.
Forum: Fixing WordPress
In reply to: Widget not visible in admin panel, but it is present in databaseOk, this is silly… I just found out what the issue is, that s:38 before the actual value that is content for the widget, that needs to match new number of characters after I have updated URLs.
Once I have done that – the widget is visible in admin panel.
Weird.
Forum: Fixing WordPress
In reply to: create child pages automaticly?bump
Forum: Fixing WordPress
In reply to: List child pages of multiple pagesbump
Forum: Fixing WordPress
In reply to: List child pages of multiple pagesOk, what i have now is really dirty solution for this problem. This is code i am using in template:
So i have outer ul where i am listing every page(page title with child pages under title in new ul).
So the code to list one page is this:
<?php $pages = get_pages('child_of=196&parent=196&sort_column=post_title&sort_order=asc'); ?> <li> <h3><?php echo get_the_title(196) ?> <ul class='mangastyle'> <?php foreach($pages as $page){ ?> <li><a href='<?php echo get_page_link($page->ID); ?>vise-o'><?php echo $page->post_title; ?></a></li> <?php }?> </ul></li>Then i just copy it and change id.
If there is no some other way to do this then i will have to go with this, i’ll probably clean it a bit, maybe create some function and put it in functions.php which i will call as many times as i need it…
So is there some other way to do this? 🙂
Forum: Fixing WordPress
In reply to: showing custom data from child pages paginationDone. 😉
Forum: Fixing WordPress
In reply to: showing custom data from child pages paginationHey! Thanks a lot for this code!
I just moved entire _mam_paginate() function to functions.php and i had to change call to _mam_paginate() function in my template from this:
_mam_paginate(sizeof($pages),$limit,$range);to this:
echo _mam_paginate(sizeof($pages),$limit,$range);Thanks again! 😉