Create a list of months based posts
Try This <a href=”https://wordpress.stackexchange.com/2016/8/?post_type=post”>August</a> <a href=”http://wordpress.stackexchange.com/2016/7/?post_type=post”>July</a>
Try This <a href=”https://wordpress.stackexchange.com/2016/8/?post_type=post”>August</a> <a href=”http://wordpress.stackexchange.com/2016/7/?post_type=post”>July</a>
I solved my problem by automatically adding the tag ‘light’ to all my projects. And then query all the post and projects with the light tag like this: Query post by taxonomy tag ‘light’: $args = array( ‘post_type’ => array( ‘projects’ , ‘post’ ), ‘tax_query’ => array( ‘relation’ => ‘OR’, array( ‘taxonomy’ => ‘post_tag’, ‘field’ … Read more
My solution works but it is a cop-out. I went to CMB2 for adding fields and it works beautifully. Some people might specifically be looking for an answer to this, so I know this is not helpful for that, but switch to CMB2 if you can.
Have you tried to echo get_previous_post_link as this is what is called when you set function previous_post_link. function fivehats_previous_post() { // You need to echo it out for it to display in the page echo get_previous_post_link( ‘%link’, ‘%title’, TRUE, ‘ ‘, ‘property-category’ ); } add_shortcode( ‘fh_prev’, ‘fivehats_previous_post’ );
Get the two post types along with their acf meta and use PHP Array Functions ( like Array Interset) to get the common/union or intersection. Additionally this will help you in this regards.
You can do this by adding this line of code to your Register_post_type $args Function array: $args array ‘with_front’ => false, this will remove the blog from the front of the CPT that you add this line. Remember to flush permalinks after you add it and save. from the codex: ‘with_front’ => bool Should the … Read more
You would do something along these lines using the category id, and an array of the post_types within your loop query_posts( array( ‘post_type’ => array( ‘post’, ‘report’, ‘opinion’, bookmark’ ), ‘cat’ => 3, ‘orderby’ => ‘date’, ‘order’ => ‘DESC’, ‘showposts’ => 5 ) ); Hope that helps
I have found a solution with ACF plugin, this plugin allow to create relationships between post types when one of the post types is created with php. You can download the plugin from here: https://www.advancedcustomfields.com/
Actually,this excerpt more with link settings automatically applies from your active theme. In order to fix this problem,Please add the below mentioned filter hook and callback function in your active child theme . function pp_custom_excerpt_length($length) { global $post; // Set content length only of process posts if ($post->post_type == ‘process_posts’ && !is_single()) { //change it … Read more
Please try below code and check if ‘sound_s‘ key exists in the array or not $file_id = get_post_meta($post_id); echo “<pre>”; print_r( $file_id ); exit;