Two CPT: one is using part of the custom rewrite slug from the other
The URL reads as if books is a sub taxonomy of publications. Try using ‘publications-books’ Don’t forget to re-save the permalinks in the settings -> permalinks options.
The URL reads as if books is a sub taxonomy of publications. Try using ‘publications-books’ Don’t forget to re-save the permalinks in the settings -> permalinks options.
I’d suggest customizing your 404 template, within your theme. That way you can add a conditional that only sends people to the “not found PDF” if they were trying to access a PDF. If they were trying to access any other document type, like a webpage, that doesn’t exist, they will still see your regular … Read more
I think I cracked it actually! Used this snippet: <?php $custom_terms = get_terms(‘topic’); foreach($custom_terms as $custom_term) { wp_reset_query(); $args = array(‘post_type’ => ‘episodes’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘topic’, ‘field’ => ‘slug’, ‘terms’ => $custom_term->slug, ), ), ); $loop = new WP_Query($args); if($loop->have_posts()) { echo ‘<h2>’.$custom_term->name.'</h2>’; } } ?>
Simple function that changes the output of the “[…..]” text and replace with the permalink. function bm_excerpt_more_link( $more ) { $post = get_post(); return ‘<a href=”‘.get_the_permalink($post->ID).'”>Read More…</a>’; } add_filter( ‘excerpt_more’, ‘bm_excerpt_more_link’, 21 ); Or you can remove “p” tag by adding this below line before your post loop. remove_filter(‘the_excerpt’, ‘wpautop’);
See my answer here on a similar question https://wordpress.stackexchange.com/posts/comments/401940?noredirect=1 that discusses a plugin I did that might start to meet your needs. The plugin is called Multisite Post Reader, and can be found here: https://wordpress.stackexchange.com/posts/comments/401940?noredirect=1 Comments about additional features can be posted in the plugin support page. If the plugin is not exactly what you … Read more
Custom Taxonomy page redirecting to 404 page
Post navigation doesn’t show (in custom template, custom post type, custom query)
Because your posts_per_page has a value of -1 means return all matching query. You should update your post_per_page to 1 and specify the order, and orderby parameters. Order the posts by date in descending order. $featured_value_cat_query = new WP_Query( array ( ‘post_type’ => ‘values’, ‘posts_per_page’ => 1, ‘orderby’ => ‘date’, // ‘order’ => ‘DESC’ … … Read more
Display related post content and custom field content
Well, you can do it in many ways. You can introduce a form with a drop down input for the terms and pass it to a function through POST or GET method and the query the posts associated with the terms, then show them. Fro capturing the send data you can use admin_post_{$action}. Read thoroughly … Read more