How can i insert term in a specific language of Polylang?

You can actually make it this way: $cat1 = wp_insert_term( ‘Cat1’, ‘category’, [‘slug’ => ‘slug-cat1’], ); $agenda = wp_insert_term( ‘Agenda’, ‘category’, [ ‘slug’ => ‘slug-agenda’, ‘parent’=> term_exists( ‘Cat1’, ‘category’ )[‘term_id’], ], ); pll_set_term_language($cat1[‘term_id’], ‘fr’); pll_set_term_language($agenda[‘term_id’], ‘de’); Here is link to Polylang Function reference: https://polylang.wordpress.com/documentation/documentation-for-developers/functions-reference/

Pagination on taxonomy archive pages breaks

Figured it out myself. Apparently, the pagination break because both my ‘products’ and my ‘types’ (those are not the terms I have, just for demonstration purposes) are having the same slug. Products has a slug of ‘products’ and types has a slug of ‘products/%typename%’. Due to this I can make my permalinks hierarchical: products/dvd or … Read more

How to display custom taxonomies with links in filter menu?

<div id=”filtering-nav”> <a href=”#” class=”filter-btn”><span>Filter</span></a> <ul> <li><a href=”#all” class=”all”>All</a></li> <?php $args=array(‘orderby’ => ‘name’,’taxonomy’=>’galleries’); $galleries=get_categories($args); foreach($galleries as $gallery){ ?> <li><a href=”<?php echo get_category_link( $gallery->term_id ) ; ?>” class=”<?php echo $gallery->gallery_nicename; ?>”><?php echo $gallery->name; ?></a></li> <?php } ?> </ul> <div class=”clearfix”></div> When you pass argument to get_categories function , you need to pass name of taxonomy as … Read more

Can taxonomies of custom post types be used with category actions?

What you’re looking for are the create_$taxonomy, edit_$taxonomy and delete_$taxonomy hooks. $taxonomy is, of course, your taxonomy name. <?php add_action( ‘create_your_tax’, ‘wpse32510_create’, 10, 2 ); funciton wpse32510_create( $term_id, $tt_id ) { // do stuff } There’s also create_term, edit_term and delete_term. Best place to find hooks: http://adambrown.info/p/wp_hooks/

How do I list the pages of a custom taxonomy?

To answer my question: You can use the loop to query only posts based on a taxonomy & terms : query_posts(‘taxonomy’=’term’); & then run the loop: if ( have_posts() ) : while ( have_posts() ) : the_post(); echo ‘<h6>’; ?> <a href=”https://wordpress.stackexchange.com/questions/36592/<?php the_permalink(); ?>”><?php the_title(); ?></a> <?php echo ‘</h6>’; the_date(); the_excerpt();

Taxonomy template shows only 10 posts

Sorry – this is probably an obvious answer but without seeing your query_posts query it’s hard to say if you’ve tried this or not. As you’re altering the main query on the page query_posts should be the right tool for the job. Something like the following query should work: <?php query_posts( ‘posts_per_page=100’ ); ?> <?php … Read more