Pagination URL order

Well this seems to fix it. Not sure if this is the best way to do it so please enlighten me if I’m wrong: By changing: if ( $wp_rewrite->using_permalinks() ) $pagination[‘base’] = user_trailingslashit( trailingslashit( remove_query_arg( ‘s’, get_pagenum_link( 1 ) ) ) . ‘page/%#%/’, ‘paged’ ); to: if ( $wp_rewrite->using_permalinks() ) $_SERVER[‘REQUEST_URI’] = user_trailingslashit( trailingslashit( remove_query_arg( … Read more

Gravity prerender taxonomy [closed]

Scoured the web and modified a snippet, in case anybody is interested: <?php add_filter(“gform_pre_render”, “gform_prepopluate_populate_books”); add_filter(“gform_admin_pre_render”, “gform_prepopluate_populate_books”); function gform_prepopluate_populate_books($form){ //Grab all Terms Associated with a Specific Taxonomy; global $post; $taxonomy = ‘genres’; $formid = 5; $fieldid = 14; if($form[“id”] != $formid) return $form; $terms = get_terms($taxonomy, ‘hide_empty=0&orderby=none’); //Creating drop down item array. $items = array(); … Read more

How to display custom taxonomy and terms using/creating plugin template

In the taxonomy-user_image_category.php the get_queried_object method will return the term object, which you can incorporate to your WP_Query. From top of my head, in your case it may look like this: $queried_object = get_queried_object(); $term_id = $queried_object->term_id; $args = array( ‘post_type’ => ‘user_images’, ‘post_status’ => ‘publish’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘sui_image_category’, ‘field’ => … Read more

Display Custom Post Type in Custom Taxonomy URL

You can use WordPress’ ability to accept custom rewrite rules to get this done. You can add the following to your functions file, or create a plugin (recommended). function url_rewrites_wpanswers() { add_rewrite_rule(‘/custom-post-type-slug/([^/]*)?$’,’index.php?post_type=custom-post-type-name&custom-taxonomy-name=$matches[1]’, ‘top’); //lets you use /posttype/customtaxterm } add_action(‘init’,’url_rewrites_wpanswers’); You would have to add a line for each since otherwise yoursite.com/something1/something2 would end up pointing … Read more

Display Custom Taxonomy of custom post type

I am assiming you already register taxonomy which show you correct links (and generate correct rewrite rules)… but lets make a checklist. 1) Register Taxonomy and assign it to different post types done by you… 2) Modify a rewrite rules add_filter(‘locations_rewrite_rules’, ‘se_119400_locations_rewrite_rules’); function se_119400_locations_rewrite_rules(){ $rules = array(); $rules[‘location(/?(([^/]+?)(/page/?([0-9]{1,})/?)?)?)$’] = ‘index.php?locations=$matches[3]&paged=$matches[5]&post_type=any’; return $rules; } 3) Taxonomy … Read more