Hi all,
I’m trying to do something similar within an Oxygen single post template.
I’ve tried using this
border-image-source: url(<?php the_field('header_image'); ?>);
transform: translate3d(0px, 0%, 0px);
outline: none;
transition-duration: 0ms;
but can’t get it to work.
Any pointers would be gratefully received.
Thanks
Phil
Hi Wyclef,
I’m looking to do the same thing and then add that to custom a post loop and single post template.
Did you find a way to do this?
Thanks
Phil
Hi Scot,
Not yet. TBH I haven’t spent much time on this since as another project has to be finished first. I’ll be picking it up again in a couple of weeks. Will let you know how I go.
Hi all,
This has been really useful for me. I’ve been trying to find a way to use an ACF field as a CPT title and this works nicely for me
`* add custom slug and title */
function my_post_title_updater( $post_id ) {
if ( get_post_type( $post_id ) == ‘venue’ ) {
$my_post = array();
$my_post[‘ID’] = $post_id;
$my_post[‘post_title’] = get_field( ‘venue_name’, $post_id );
wp_update_post( $my_post );
}
}
// run after ACF saves the $_POST[‘fields’] data
add_action(‘acf/save_post’, ‘my_post_title_updater’, 20);
A couple of quick questions …
How can I concatenate two variables so that I can use ‘venue_name’ and ‘venue_city’?
Also, how can I expand this to update the slug to use the same title ‘venue_name’ and ‘venue_city’? I currently have http://localhost:8888/gigs/venue/auto-draft/ as the slug.
Thanks all.
Cheers
Phil
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.