How to sync tags between posts that are linked through Posts 2 Posts?

I think there are 2 solutions for you problem. The first is rely on P2P functions like each_connected (see this as example) and retrieve the connected ‘Person’ after running a taxonomy query for ‘Activities’. Maybe this solution can be easier, faster and straightforward. Second solution is what you says in your question: apply the taxonomy … Read more

Custom meta fields for specific custom type only

EDIT: I also recommand you to use nonces to check your field before saving. EDIT2: Nonces Just before field, define a nonce : wp_nonce_field( ‘curiculum_meta_box_nonce’, ‘meta_box_nonce’ ); Your saving function is not correct, use this instead : function save_curiculum_date($postid) { //stop if autosave if( defined( ‘DOING_AUTOSAVE’ ) && DOING_AUTOSAVE ) return; // if our nonce … Read more

Pagination problem

The function redirect_canonical() is ‘responsible’ for your problem. Your default WordPress pagination (with core functions) is not gonna work if you do this, but you can filter out the pagination for your particular custom url: add_filter( ‘redirect_canonical’, ‘wp230913_canonical’, 10, 2 ); function wp230913_canonical( $redirect_url, $requested_url ) { if ( preg_match( “#foo/bar/[0-9]+/page/[0-9]+#”, $redirect_url ) ) { … Read more

Custom post types, taxonomies, and permalinks

Change slug in your post type arguments to products/%product_cat%, and slug in your taxonomy arguments to just products, then flush your rewrite rules. WordPress should now handle /products/my-product-cat/post-name/! Now finally, we need to help WordPress a little with generating permalinks (out of the box, it won’t recognise the permastruct tag %product_cat%): /** * Inject term … Read more

Custom post type archive page pagination

Shouldn’t it be like this? ‘paged’ => (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1 And next_posts_link/previous_posts_links has these arguments: next_posts_link( $label , $max_pages ); $label is not a string in your code but a kind of an array? I am not so familiar with these “magical PHP functions”, but what do you suppose these “__” to do? … Read more