Migrating data from ACF to WordPress custom meta boxes
Migrating data from ACF to WordPress custom meta boxes
Migrating data from ACF to WordPress custom meta boxes
You should look at archives.php. What you trying to do is create a custom post type loop (“pages) in different sections of your template. You have to filter by category, taxonomy, or tags to set up your different groupings. http://www.wpbeginner.com/wp-tutorials/how-to-create-a-custom-post-types-archive-page-in-wordpress/ https://stackoverflow.com/questions/30883218/custom-post-type-wordpress-query-by-category I think this is what I mean: List all posts in custom post type … Read more
Insert Content into Script with Advanced Custom Fields
This is a little more complicated. You have to loop through the elements first, and create a twodimensional array containing weekday and time. $entries = array(); while ( have_rows(‘tag’) ) : the_row(); //clean thisentry $thisentry = array(); // set aufguss and sauno for thisentry $thisentry[‘aufguss’] = get_sub_field(‘aufguss’); $thisentry[‘sauna’] = get_sub_field(‘sauna’); // populate array for wochentag/uhrzeit … Read more
This is not the way which you have clled for ACF. Parameters <?php $field = get_field($field_name, $post_id, $format_value); ?> $field_name: the name of the field to be retrieved. eg “page_content” (required) $post_id: Specific post ID where your value was entered. Defaults to current post ID (not required). This can also be options / taxonomies / … Read more
User meta not saving properly
Get all custom fields with wp’s get_posts()
Filter posts by advanced custom field
Don’t quite understand how this looks on the backend. Also does it needs to look like it’s checkboxes, or are you trying to group them in some way?
add_action(‘publish_post’,’create_custom_field’) function create_custom_field ($post_id) { global $wpdb; if ( current_user_can(‘contributor’) ) { if(get_post_meta($post_id,’custom_field_1′,true) == ‘1’){ add_post_meta($post_ID,’submit’,’1′,true); return $post_id; } return $post_id; } }