Create a CPT to edit Shortcodes Atts

Add below code on functions.php file and that’s it…………… Here, I use slick slider for the carousel view you can change as per your choice. replace word post with respected post slug in below lines add_meta_box ( ‘customdiv’, ‘Image Gallery’, ‘custom_print_box’, ‘post’, ‘normal’, ‘high’ ); && manage_post_posts_columns && manage_post_posts_custom_column simply add shortcode in any of … Read more

Expire post to draft by date-picker custom field

ACF saves the value as Ymd format in database regardless of display and return format. All you need is a meta query to fetch the correct posts. function expire_posts_function() { //Get Expired Posts only $expired_posts = get_posts(arrasy( ‘post_type’ => ‘event’, ‘posts_per_page’ => -1, ‘post_status’ => ‘publish’, ‘meta_query’ => array( array( ‘key’ => ‘ev_date’, ‘value’ => … Read more

Get dropdown child categories from parent category of custom post type

WordPress always has similar function to a list, you may try wp_dropdown_categories instead of wp_list_categories. It takes almost the same arguments, which is not related to list items. $tax = get_term_by(‘slug’, ‘cursos’, ‘portfolio_category’); $tax_id = $tax->term_id; $args = array( ‘child_of’ => $tax_id, ‘taxonomy’ => ‘portfolio_category’, ‘orderby’ => ‘name’, ‘show_count’ => 0, ‘hierarchical’ => 0 ); … Read more