custom post template not getting picked for posts with Unicode title
custom post template not getting picked for posts with Unicode title
custom post template not getting picked for posts with Unicode title
WordPress does this for you. You shouldn’t need a custom Page template or custom query and pagination. Just set ‘has_archive’ to true when registering the post type. Then you automatically get /episodes and /episodes/page/X. Then you just need to create archive-afleveringen.php for the template, and in that template use the functions for the main query: … Read more
Have reviewed your code but could not get what actually is wrong with the code. Another possible solution is that, you can use third-party WordPress plugin WP Full Calendar and select your post type in the plugin settings. You can then use short-code to display the full calendar in any of your website page/post. WP … Read more
Assuming that your theme still has the_content to populate that area you can use the_content filter to populate is. Because widgets normally echo their output you would also need to buffer output. Like this: add_filter (‘the_content’,’wpse304648_widget_content’); function wpse304648_widget_content ($content) { if (get_post_type == ‘your_cpt_name’) { ob_start (); .. execute widget $content = ob_get_contents(); ob_end_clean(); } … Read more
Confused about where to store my data
Yes, it can be done (it’s almost always true ;))… The question is how to do this? 😉 And here is the solution… You’ll have to use acf/load_field filter: function set_acf_field_default_value( $field ) { switch ( $field[‘name’] ) { case ‘name_provider’: $field[‘value’] = ‘PUT YOUR VALUE HERE’; break; } return $field; } add_filter(‘acf/load_field’, ‘set_acf_field_default_value’ ); … Read more
Custom Post Type Query by user id
Have found the solution I only have to add the right tax_query… $posts_info = new WP_Query(array( ‘post_type’ => ‘tarife’, ‘posts_per_page’ => 3, ‘post_status’ => ‘publish’, ‘post__in’ => $products, ‘orderby’ => ‘title’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘tarif_kategorie’, ‘field’ => ‘slug’, ‘terms’ => ‘info’, ), ), )); $posts_gf = new WP_Query(array( ‘post_type’ => ‘tarife’, ‘posts_per_page’ … Read more
Thanks to Milo’s comment I could find a solution. In my home.php I have deleted the custom query and inserted: <div class=”news-content col-12 col-xl-8″> <div class=”row”> <h1>News</h1> </div><!– .row –> <div class=”row”> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); if(has_post_thumbnail()) :?> <div class=”news-wrapper col-12 col-xl-6″> <div class=”news-date”> <?php the_time(‘j.m.Y’); ?> … Read more
Assuming the function hooked to the action load_posts_by_ajax is your load_posts_by_ajax_callback() code (seems a reasonable assumption), the query arguments can be easily modified. You mention “displays only 3 posts” which is what the code is designed to do. If you wish to show 10 posts, update the posts_per_page argument listed. ‘posts_per_page’ => ‘3’, The bigger … Read more