Populate ACF repeater with current structure of pages
Populate ACF repeater with current structure of pages
Populate ACF repeater with current structure of pages
You get the author ID of the post ID via get_post_field $post_author_id = get_post_field( ‘post_author’, $post_id ); With this post ID you get all author meta data, also the name like the_author_meta( ‘display_name’, $post_author_id );
You’re saying that you’ve set images in homepage admin, so I guess you’re using static page as homepage… In such case you can use this code to show these images anywhere else on your site: <div class=”container”> <div class=”journal-block”> <div class=”row”> <?php if ( have_rows( ‘gaimages’, get_option(‘page_on_front’) ) ): ?> <?php while ( have_rows( ‘gaimages’, … Read more
<?php $slider = get_posts( $slider = g array( ‘post_type’ => ‘event’, ‘posts_per_page’ => – 1 )); ?> <?php $count = 0; ?> <?php foreach($slider as $slide): ?> <?php setup_postdata( $slide); $title = the_field(‘event_name’); ?> <?php endforeach; ?> <?php wp_reset_postdata(); ?> Or <?php $slider = get_posts( $slider = g array( ‘post_type’ => ‘event’, ‘posts_per_page’ => – … Read more
Creating a page from acf fields
Please check if echoing $fxdate is working. $fxdate = get_field(‘fl_date’); In ACF simply below code works, if($fxdate){ echo “set”; } else { echo “not set”; }
How to display dropdown filters for posts
As I am new here too, I can’t comment and ask for clarification or give some suggestions, so I’ll do that here. Why do you have nested repeaters recent_documents and new_document? It appears that recent_documents always has only single row, otherwise there would be a mess. But anyway, working with what you have, you could … Read more
ACF Repeater and Sort
I’m assuming that $attachments_ids are the new values you want to save. $field = get_field(‘images’); $attachments_ids = [ 0 => 22222, 1 => 33333, 2 => 44444, 3 => 55555 ]; update_field($field, $attachment_ids, $post_id);