How to Create movie schedule by custom post type query

It’s very good that you are using Advanced Custom Fields. Use this for assigning running dates to movie and by making use of WP_Query you can call movies wherever is matching date. For fetching posts you can use following code: $args = array( ‘post_type’ => ‘movie’, ‘meta_key’ => ‘date’, ‘meta_query’ => array( array( ‘key’ => … Read more

Custom taxonomy term links out of order

Use wp_list_categories() instead, which handles the display and ordering of hierarchical terms. Despite its name suggesting that it’s just for categories, it works with custom taxonomies too: $taxonomy_args = array( ‘public’ => true, ‘_builtin’ => false, ); $output=”names”; $operator=”and”; $taxonomies = get_taxonomies( $taxonomy_args, $output, $operator ); if ( $taxonomies ) { foreach ( $taxonomies as … Read more

How to show post which has the specific taxonomy terms?

Use this code instead. $terms = wp_get_post_terms( $post->ID, array(‘competition’, ‘session’) ); $term_slugs = wp_list_pluck( $terms, ‘slug’ ); $season = wp_get_post_terms( $post->ID, ‘session’ ); $season_slugs = wp_list_pluck( $terms, ‘slug’ ); $args = array( ‘post_type’ => array( ‘football_fixture’ ), // profile and letter are CPTs ‘tax_query’ => array( array( ‘taxonomy’ => ‘competition’, ‘field’ => ‘slug’, ‘terms’ => … Read more

Edit single page from plugin

You could do this with the the_content filter: /** * Adds some text to bottom of the content on ‘season’ pages. * * @param string $content The current content of the season page. * @return string The new content of the season page. */ function add_season_content( $content ) { if ( is_singular( ‘season’ ) && … Read more