Well got the plugin working now, but now the theme options page is not showing up…
acf_add_options_page( array(
Never mind, Fixed it…
call the add_filters BEFORE the afc_add_options_page
Yes! awesome mediawerk Thank you very much
John also a big thanks! you guys helped me out a lot!
Awesome , that worked!
no i have the next problem
it is no link.
i have tried :
<div class="facebook-test">
<?php if(!empty(the_field('facebook' , 'option')) ) { ?>
<a href="<?php the_field('facebook' , 'option'); ?>" target="_blank"> </a>
<?php } ?>
</div>
and :
<?php if( get_field('facebook' , 'option') ): ?>
My field value: <a href="<?php the_field('facebook' , 'option'); ?>"> </a>
<?php endif; ?>
<br />
hoe can i make this image a link ? (the image or the tekst is no link) in the back-end i selected URL
never mind! it is working now! when i saved the post again. it displays on the website
thanks!!
Awesome! thank you! that was it.
i have one more question,
on the website it shows only 1 future post. when that date is reached and past, it displays the next post.
is it possible to get all the future posts?
i tried to change the ‘post_per_page’ => ‘-1’ to something else, but that doesn’t do the trick.
Hey guys!
I have the same issue, i want to display future post only.
I tried the solution Jason typed out.
Here is my code.
`<?php
//Set server timezone to central
date_default_timezone_set(‘Europe/Amsterdam’);
//Today’s date
$date_1 = date(‘Ymd’, strtotime(“now”));
//Future date – the arg will look between today’s date and this future date to see if the post fall within the 2 dates.
$date_2 = date(‘Ymd’, strtotime(“+12 months”));
?>
<?php
//arg to determine if the post is an upcoming event.
$upcoming_args = array(
‘post_type’ => ‘programma’,
‘posts_per_page’ => -1,
‘meta_key’ => ‘start_date’,
‘meta_compare’ => ‘BETWEEN’,
‘meta_type’ => ‘numeric’,
‘meta_value’ => array($date_1, $date_2),
‘orderby’ => ‘meta_value_num’,
‘order’ => ‘ASC’
);
?>
<?php
// the upcoming events query
$upcoming_query = new WP_Query( $upcoming_args );
?>
<?php if ( $upcoming_query->have_posts() ) : ?>
<!– the loop –>
<?php while ( $upcoming_query->have_posts() ) : $upcoming_query->the_post(); ?>
<?php the_field(‘datum’); ?>
<?php
if( have_rows(‘programma_tijden_2’) ): ?>
<div id=”programma_tijden_2″>
<?php
// loop through rows (parent repeater)
while( have_rows(‘programma_tijden_2’) ): the_row(); ?>
<div class=”even-testen”>
<!– wrap the_sub_field in elk een aparte div voor de styling –>
<?php the_sub_field(‘tijdstip’); ?> <br />
<?php the_sub_field(‘informatie’); ?> <br />
<?php the_sub_field(‘extra_informatie’); ?> <br />
</div>
</div>
<?php endwhile; ?>
<?php endif;?>
<?php endwhile; ?>
<!– end of the loop –>
<?php wp_reset_postdata(); ?>
<?php else: ?>
<p><?php _e( ‘Er zijn momenteel geen evenementen meer.’ ); ?></p>
<?php endif; ?>
`
The only thing i see on my site is there are no events (the else statement)
What am i missing?
i’am not creating a new post, because i’am using this code. if needed i will create a new post.
thnx in advance
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.