WordPress pre_get_posts with combined results of two queries (OR)

See WP_Query as reference for the post query filters. You can filter posts by their authors with the ‘author’ query var as you filter posts by their taxonomy with ‘tax_query’ query var. Then, conditionally set the ‘tax_query’ query var depending on the user’s company meta field. If it’s empty, set the ‘author’ query var instead. … Read more

parse content from wikipedia article replacing search term with the title of article

You can’t and shouldn’t echo something into a function’s arguments. The single_post_title() function will echo the title by default. You should either set the second parameter to false, or use another function: echo getDescription( single_post_title( ”, false ) ); WordPress also offers the get_the_title() function that returns the single post’s title which you can use … Read more

Set a CPT slug as a base name for all the taxonomies

I think if you change the rewrite in your register_taxonomy $args ‘rewrite’ => array( ‘slug’ => ‘photographies/couleurs’,’with_front’ => false ), This will probably clash with rewriting the custom post type so you’ll more than likely get a 404 on this url: http://thewebsite/photographies/ but if you don’t need that url then this solution will help you … Read more