Has anyone a proper solution for this ?
At the moment I use
$padding_top_string = $block['style']['spacing']['padding']['top'];
$padding_top_value = (int) substr($padding_top_string, strrpos($padding_top_string, '|') + 1);
this seems much to dirty…
Is there no one with the same issue out there?
and even the default ?udated=true – is not working, just the same page is loaded again. blank.
Unfortunately the sorting doesn’t work as expected – seems that the “orderby” in the second query is ignored….
Could someone tell me what I’m doing wrong, please…
Best
P.
Ive manged to do it like this:
<?php // WP_Query arguments
$args = array(
'post_type' => array( 'artists' ),
'orderby' => 'menu_order',
);
// The Query
$query = new WP_Query( $args );
// The Loop
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
$id = get_the_id();
$title = get_the_title();
$args_inner = array(
'post_type' => array( 'events' ),
'meta_key' => 'event_artist',
'meta_value' => $id,
'orderby' => 'event_date',
'order' => 'ASC'
);
// The Query
$query_inner = new WP_Query( $args_inner );
// The Loop
if ( $query_inner->have_posts() ) {
echo '<h2>'.$title.'</h2>';
while ( $query_inner->have_posts() ) {
$query_inner->the_post();
$date = get_field('event_date');
$artist_obj = get_field('event_artist');
$event_title = get_the_title();
echo '<li>';
echo $date;
echo $artist_obj -> post_title;
echo $event_title;
echo '</li>';
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();
}
} else {
// no posts found
}
// Restore original Post Data
wp_reset_postdata();
?>
Is ther a possiblity to add a parameter to show only future events from today onwards?
I mean a working version of
https://github.com/helmutschneider/acf-s3-content
A file-field type which connects to an Amazon S3 bucket and lists the files as treeview.
Hello John,
is it possible to allow the logged in user to edit the relationships
in frontend (for example to delete some from the list) ?
Best
P.
Hello John,
thanks a lot – I’ll check this.
I want to tore the post ids of a custom post type, so a relationship field is
the perfect solution i think.
Best
P.
I’m not worried at all. I just wanted to know how the future development of ACF is planned and if we can depend on it.
Best
P.
As a professional web development agency which cares a lot for its customers , we can’t be guided by an italian saying 🙂 Is there a kind of SLA for ACF?
Best.
P.
Same here. I’ve some problems saving a Flexible Layout group containing 5 layouts / 24 fields. The site feels very slow (JS) an needs about 10 seconds to save in Chrome – in IE it seems a bit faster. Is there a fix for this?
Thanks! Is there also a plugin solution out there which is known to work with ACF…..something like https://wordpress.org/plugins/wp-pdf-templates/ – which creates a PDF endpoint ? Not sure if its working with ACF fields…
Its generated like this by Soundcloud (with option “Code for WP” enabled – so it should not contain any characters which would the native WP editor cause to fail.
But ACF WYSIWY field just puts out the code and is not rendering it?
Yes, this is visible when editing the field group and viewing my field’s settings (screenshot attached).
No input on this one?
<?php
/**
* The Template for displaying all single posts
*
* @package WordPress
* @subpackage Twenty_Fourteen
* @since Twenty Fourteen 1.0
*/
get_header(); ?>
<?php
// custom filter to replace '=' with 'LIKE'
function my_posts_where( $where )
{
$where = str_replace("meta_key = 'list-wines_%_item-wine'", "meta_key LIKE 'list-wines_%_item-wine'", $where);
return $where;
}
add_filter('posts_where', 'my_posts_where');
// args
$args = array(
'post_type' => 'post',
'meta_query' => array(
array(
'key' => 'list-wines_%_item-wine',
'value' => '"' . get_the_ID() . '"',
'compare' => 'LIKE'
)
)
);
// get results
$the_query = new WP_Query( $args );
// The Loop
?>
<?php
if( $the_query->have_posts() ): ?>
<ul>
<?php while ( $the_query->have_posts() ) : $the_query->the_post();
$parent_id = get_the_ID();
?>
<li>
<a href="<?php the_permalink(); ?>"><?php the_ID(); the_title(); ?></a>
</li>
<?php endwhile; ?>
</ul>
<?php endif; ?>
<?php wp_reset_query(); // Restore global post data stomped by the_post(). ?>
I got the snippet from the forums…I need to get the time code for the item-wine to, not just the title. Could anyone give me a hint, please
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.