Problem with adding exta field in metabox in custom post type

You didn’t retrieve your 2 values in the save_post action. You need to get $_POST[’freebie-demo’] (it’s ok for it) and $_POST[‘freebie-downurl’] If you want an array post meta value based, you can do something like that : // Sanitize user input. $de_url[‘name’] = sanitize_text_field( $_POST[‘freebie-demo’] ); $de_url[‘url’] = esc_url($_POST[‘freebie-downurl’]); // Update the meta field in … Read more

Showing an ACF field in admin posts dashboard

This code worked perfectly fine: function custom_columns( $columns ) { $columns = array( ‘cb’ => ‘<input type=”checkbox” />’, ‘title’ => ‘Title’, ‘featured_image’ => ‘Image’, ‘categories’ => ‘Categories’, ‘amazon_url’ => ‘Amazon Link’, ‘comments’ => ‘<span class=”vers”><div title=”Comments” class=”comment-grey-bubble”></div></span>’, ‘date’ => ‘Date’ ); return $columns; } add_filter(‘manage_posts_columns’ , ‘custom_columns’); function custom_columns_data( $column, $post_id ) { switch ( … Read more

get terms that have post with custom post type between 2 values

This is the finish code for this: <?php $dates_array = array(); $countries_array = array(); $term_list = array(); $current_term_list = array(); $args = array( ‘post_type’ => ‘tours’, ‘posts_per_page’ => -1 ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $post; $tour_terms = wp_get_post_terms( $post->ID, ‘tours_cats’ ); $current_term_list = array(); foreach ($tour_terms … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)