Support

Account

Forum Replies Created

  • I’m running into this too. If I register an ACF block and set the mode to “edit” it doesn’t do anything. In fact, it’s worse. If I set it to “auto” at least the editor is in the main section instead of only on the side. But I’d love the default to show up in edit mode, in the main section.

  • Hey, did you ever get an answer on this? I’m trying to forced text input fields to 100% width in the admin with a media query, and nothing I’m doing will work.

  • NICE! Worked beautifully. Thanks.

  • For anyone else reading this, what Jefferey said here works:

    <?php $theEmail = get_field('pro_email'); ?>
    <a href="mailto:<?php echo antispambot( $theEmail ) ?>">
    Email Me
    </a>
  • Here’s the answer to this: In my Debian 8.1 LAMP install, there was a setting turned off in the php.ini file. I’ve never run into that before installing LAMP on Debian.

    The setting: short_open_tag

    That needs to be on. Once I changed and restarted Apache, all was right with the world.

  • Update: 5.2 still isn’t working for me. I’m also not seeing the “Field Group” option on other sites after upgrade to 5.2. So for now, going back to 5.1.8 as that one works on all of my sites.

  • Sorry for the late reply. I’ve on ACF Pro 5.2 now and yeah, the field group wasn’t selected. Checked that and I see the fields.

    BTW…WordPress wouldn’t be WordPress without ACF. I can’t imagine not having your plugin.

  • Lol. Well aren’t I the typical American, assuming you’re here like that.

    Don’t come out this way, I’d rather bring my wife there for a trip!

    Thanks again man. If you do contract work, send me your info. I might need someone who knows more in the future.

  • Jonathan, dude…I owe you. If you’re ever in Santa Monica, CA look me up and remind me that I owe you dinner.

    Your code worked great, and did exactly what I needed. I would never have been able to figure that out.

    Thanks man!!!

  • One more question, and I’m happy to pay you for time, just shoot me your PayPal:

    So the above works beautifully. Now what if I wanted to also pull a field or fields from the existing repeater field, meaning not the post object. I’m trying this, but it’s not working:

    <?php 
    	//Loops through the repeater
    while (have_rows('favorite_cars')) {
    	the_row();
    	
    	//fetches the post object field. Assumes this is a single value, if they can select more than one you have to do a foreach loop here like the one in the example above
    	$car_object = get_sub_field('select_car');
            $title = get_sub_field('car_title');
            $summary = get_sub_field('car_summary');
    	if($car_object){
    		//Fetch the image field from the carsandtrucks post
    		$image = get_field('main_image', $car_object->ID);
    	}
    	
    	//Echo out the image with the medium size. Change this as you like!
    	echo '<img src="' . $image . '" width="' . $image . '" height="' . $image . '" alt="' . $image['alt'] . '" />';
            echo '<div>$title</div>';
            echo '<div>$summary</div>';
    	
    } 
    ?>

    So as you can see, I’m trying to pull a title and summary (both ACF fields) from the current post, along with the post object from the other.

    In case this doesn’t make sense, someone is choosing a car from another CPT, and then entering their own title and descriptions on the current post.

    Thank you!

  • Holy crap Jonathan, that worked. Thanks man!!!!

    I had to change the image line to make it work, I guess because my site doesn’t have medium images?

    Here’s what I have:

    <img src="' . $image . '" width="' . $image . '" height="' . $image . '" alt="' . $image['alt'] . '" />

    Is that bad? Not sure how it’s generating the alt tag though.

  • Hey guys, this looks like the data I’m after, but I don’t get too deep into programming. If one of you could clarify, I’d really appreciate it. Here’s my situation:

    I have a repeater field called favorite_cars. In this field, I have a post object field called select_car. This is linking to a custom post type I have with it’s own set of ACF fields. I want to access those. I can with a normal post object chunk of code, but don’t know how to do it within a repeater field.

    So again, to summarize:

    Repeater: favorite_cars
    Post Object Field: select_car
    Custom Post Type used in Post Object filter: carsandtrucks
    ACF field in the carandtrucks CPT: main_image

    So I’m trying to pull say the picture of a Corvette (main_image) that’s in the carsandtrucks CPT from a select post object field named select_car in the repeater field called favorite_cars.

    Hope that makes sense. Thank you!

  • Hey thanks Elliot. I did in fact download again today and tested – BOOM. It’s working.

    And Elliot, we can say thanks enough for ACF. WordPress wouldn’t be WordPress without it.

  • I’m still holding off on 5.0.8 on all of my sites. Forgot and updated one of them, and then the user support emails started. Had to go back to 5.0.7 and then all image upload problems vanished.

  • This problem has gone away for me with ACF v5

  • Paid to get the answer from somewhere else. Here it is for anyone wanting to do this: basically, if your ACF check box field is called “services_offered” and one of the services was “ac” then it would look like this:

    <?php
    
    				$values = get_field('services_offered');
    
    				if(in_array("ac", $values )){
    				?>
    				<div class="dealer-services-icon"><img src="<?php echo get_bloginfo('url'); ?>/media/icon-ac.png" alt="<?php the_field('focus_city'); ?> Air Conditioning Service" class="tooltips" title="Air Conditioning"></div>
    				<?
    				}
    
    				?>
  • Anyone have an idea on this? I really need to be able to use check boxes with and “if” type setup.

    Thanks for any help!

  • Not a problem. Press Permit or any other role plugin will work fine. That’s the easiest part. My big dilemma was having a registration form that allowed people to register, create a profile, and then not have access to anything else.

    I can’t believe BuddyPress doesn’t use CPTs. But…whatever.

    Have fun! I’m using it on one live site, and a new one that I’m building right now.

    Also, the Tabby Tabs plugin might be of use for your profile building. Very easy to implement, and it’s responsive.

  • Anyone on this? I know that this will return the values:

    <?php
    
    		$values = get_field('services_offered');
    		if($values)
    		{
    			echo '<ul>';
    
    			foreach($values as $value)
    			{
    				echo '<li>' . $value . '</li>';
    			}
    
    			echo '</ul>';
    		}
    
    		?>

    But I want to show a certain image for each checkbox, so I need if and then type statements. Meaning, if this checkbox is checked, display this image.

  • Seth,

    I’m doing exactly what you need to do. I can’t go into granular detail right now, but I even tried BuddyPress 2.0 but it was lacking too much as far as the richness of the profiles.

    Here’s what I’m doing:

    1) Setup a custom post type for the profile, and then a role for that post type. Use the Members plugin by Justin Tadlock to do that, and reference this article on registering the post type with the right capabilities: http://wp-snppts.com/create-a-custom-post-type-and-define-custom-role-capabilities.

    2) Once you’ve done the above, you’ll have a role that has rights to the CPT. Now, get the USP Pro plugin. This plugin allows you to setup a registration form for users. When they register it creates their “profile” (the CPT) and assigns them as the author and also assigns them with the right role. Jeff, the plugin author of USP Pro is pretty helpful.

    3) Define whatever ACF fields you want for the CPT to build beautiful profiles.

    4) The Simple User Profile plugin by Innovative Solutions will let you dial in what a user can and cannot see when they sign in.

    It took some time to figure out all of the above, but it works beautifully.

  • Okay cool. Thanks Elliot.

  • Angelo – sorry man! I called you Elliot above.

    I’ve still had no issues with my ACF 5 Pro sites. I have one CPT that has about 20 ACF fields assigned to it taking text, images and file uploads. Works great.

    – kyler

  • Elliot,

    I’ve started a couple new sites already with ACF5 and haven’t had any problems.

    I use ACF on these sites to create detailed custom post types that handle image uploads, file attachments, WYSIWYG editors, select fields, date pickers, etc.

    I’ve also upgraded a couple sites to ACF 5 and have been happy.

  • I’m attempting to get this to work, but without success. I think I just have some of the code wrong from Jonathan’s example.

    My functions.php:

    if ( function_exists( 'add_image_size' ) ) add_theme_support( 'post-thumbnails' );
    
    	if ( function_exists( 'add_image_size' ) ) {
    	add_image_size( 'profile', 650, 650, true );	
    }

    My template file:

     <?php $image = get_field('test_image'); ?>
                        <?php if($image): //dont output an empty image tag ?>
                        <img src="<?php echo $image['profile']['customsize']; ?>" width="<?php echo $image['profile']['customsize-width']; ?>" height="<?php echo $image['profile']['customsize-height']; ?>" alt="<?php echo $image['caption']; ?>" />
                        <?php endif; ?>

    Any help appreciated! To clarify the above, but ACF image field is set to object, and it is called test_image. Thanks.

  • Gotcha.

    Mine is still a bug.

    If I check settings such as “Hide Content Editor” ACF is not saving the settings since WP 3.9.1.

    I’ve verified this on two different sites with the latest ACF plugin.

Viewing 25 posts - 1 through 25 (of 33 total)