S R Tayade
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Pagination with GET parameters giving 404 errorThanks @bcworkz for your explanation, but I’m still confused. Below I have given template code. Can you suggest me the way to achieve this functionality.
<?php /* * Template Name: All Colleges list Template Post Type: cb_college */ get_header(); //wp_reset_query(); $args = array( 'post_type' => 'cb_college', 'posts_per_page' => 2, 'orderby'=> 'title', 'order' => 'ASC', 'post_status' => 'publish', 'paged' => get_query_var('paged') ? get_query_var('paged') : 1 ); if( isset($_GET['filter_submit']) || isset($_GET['location']) ){ $tax_query = array('relation' => 'AND'); if (isset($_GET['location'])) { $tax_query[] = array( 'taxonomy' => 'location', 'field' => 'name', 'terms' => $_GET['location'] ); } $args['tax_query'] = $tax_query; } $wp_query = new WP_Query( $args ); if (have_posts()) : while ($wp_query->have_posts() ) : $wp_query->the_post(); ?> <h5 style="text-align:left;"><?php echo get_the_title() ; ?></h5> <?php // Get terms for post $terms = get_the_terms( $post->ID , 'location' ); // Loop over each item since it's an array if ( $terms != null ){ foreach( $terms as $term ) { // Print the name method from $term which is an OBJECT echo "<p><b>Location : </b>".$term->name."</p>"; } } endwhile ; // pagination next_posts_link(); previous_posts_link(); endif ; wp_reset_query(); get_footer(); ?>
Forum: Plugins
In reply to: [Custom Permalinks] Polylang – Share same slug between languagesI also need the solution on same issue. Just updated wordpress and polylang to latest versions. No luck. Anyone found some solution?
Forum: Plugins
In reply to: [WooCommerce] change woocommerce product permalink structureOk. Thanks for the help.
Forum: Plugins
In reply to: [WooCommerce] change woocommerce product permalink structureYou can see working example here:
https://www.researchnester.com/reports/fire-trucks-market/961
https://www.researchnester.com/reports/airbag-sensors-market/960So even if you just change the number at last. It’ll take you to that report. I want similar for our woocommerce products.
Forum: Plugins
In reply to: [WooCommerce] change woocommerce product permalink structureBecause I need product name in URL for SEO purpose and I need product ID for easier access. I have list of Product names and IDs. So it will be easier for me to access that product as I’ll just change ID at the end and then it’ll take me to that product. Because product ID will never change. Other things may be change with small edits.
Forum: Plugins
In reply to: [Advanced Woo Search] two results for one productYeah… It worked. I changed SQL query, just put distinct ID instead of ID as you told.