How to add custom taxonomy slug in CPT permalink?

I solved this way: Register Custom Post Type: function custom_post_articles() { $labels = array( ‘name’ => _x( ‘Articles’, ‘post type general name’, ‘textdomain’ ), ‘singular_name’ => _x( ‘Article’, ‘post type singular name’, ‘textdomain’ ), // etc… ); $args = array( ‘labels’ => $labels, ‘public’ => true, ‘menu_position’ => 5, // Below Posts. ‘menu_icon’ => ‘dashicons-megaphone’, … Read more

List of posts by day of the week

What about using just get_posts (removing the order_by argument), then looping through to create and array of programs, then building the output from that: $posts = get_posts(array(‘post_type’=>’programas’,’meta_key’=>’audio_date’)); $programs = array(); foreach ($posts as $post) { $days = get_post_meta( $post->ID, ‘audio_date’, true ); // $time = get_post_meta( $post->ID, ‘audio_time’, true); $found = false; foreach ($days as … Read more

How to insert a local image with custom size

add_image_size function has nothing to do with the images that are located in theme root directory. When you add add_image_size function , we are saying that : Hey WordPress! Can you please also re-size my uploaded images via WordPress admin to this particular size also hard crop the image if image size is bigger ( … Read more