Author archive custom posts only?

You want to only query posts from the post-type direct_blog, but NOT the normal post type? Than you simply need to remove post from this line: $query->set(‘post_type’, array(‘post’, ‘direct_blog’)); Update: I just tested the following code. First you need to revisit your function, as you have some errors in it. In the code in your … Read more

Custom post type rewrite and wp_pagenavi interfering with each other

I solved it. To enable the new rule, save the parmalink structure. Ive tried to follow the example with news from above. function news_page_rewrite_rule() { // Get the URL of the page listing out the news. // Here I use the Advanced Custom Fields plugin. $news_page_url = get_field(‘_news_page’, ‘options’); if (empty($news_page_url)) return; // Get the … Read more

Custom post url in search.php isn’t the correct rewrited url

Solved, it was an issue with assigned parent- and subcategories. Because I’m using the ‘WP All Import’ plugin connected to Google Drive, posts are automatically imported. Since some of the posts don’t have categories assign in the Google Drive document, ‘WP All import’ doesn’t assign a category on importing the data. For some reason this … Read more