Support

Account

Forum Replies Created

  • Manheim, can you please state where this giant button to download prior versions lives? There’s a lot of Internet out there.

    Thanks!

    FOLLOW-UP: If anyone’s wondering, you go to Account > My Licenses (scroll down) > ACF Pro > click on the “tag” icon.

    http://www.advancedcustomfields.com/my-account/

  • I purchased WordPress Ultimate CSV Importer Pro from Smack Coders.

    The interface looks capable but I am waiting for support to lead me to documentation on how to attack ACF Fields. I see documentation elsewhere about using pipes for wp category selections and ID numbers for other stuff, but haven’t figured out if that holds for ACF yet.

    I need to do fields like User, Relationship, Post Object and Image. I see a few people on here claim that this plugin doesn’t support ACF images, but I will post back if I learn differently. It certainly import the easy stuff — standard fields, text, text areas — which was a small relief in itself. I can train other people how to get things done without MySQL!

  • On Friday I replaced the /js/input.min.js file with the one from the previous release, 5.0.4. That fixed the issue for me.

    I also downloaded Elliot’s solution this morning. Not sure what all files changed, but that appears to have worked too.

    Thanks!

  • Thank you so much for the response, Elliot.

    Yes, I am writing about this plugin:
    https://github.com/strickdj/acf-field-address

    I think you meant to give me this link:

    Creating a new field type
    http://www.advancedcustomfields.com/resources/tutorials/creating-a-new-field-type/
    https://github.com/elliotcondon/acf-field-type-template

    I will give it a shot! (Unless there is a better way to create a group of fields similar to the functionality of this plugin.)

    Also, others’ reference, similar to what I want to do — extract address field types from lat/lng Google Maps settings — you mentioned a good stackoverflow thread here (another here) about “reverse geocoding.”

    I’ll try the field type template first. Thanks!

  • Sorry, would be great if I could somehow extract city and country from the Google Maps field, but … I can’t do that, right?

  • Hey @robert.pal

    I’m having the same issue. Somebody posted about this in the general support forum and got a follow-up with a bit of a workaround. The workaround doesn’t work for me and I’m pretty much hamstrung on a site until I get a real solution. I’m trying to highlight the issue in hopes that someone will find a full fix.

    http://support.advancedcustomfields.com/forums/topic/taxonomy-term-show-this-field-group-if-not-applying/

    I took a look at the plugin code change from 5.0 to 5.0.1, but … uh … no.

  • Hi @elliot

    Yes, I’m trying to get an array, but can’t figure out how. When I print_r, as you requested, I get one sad ID.

    WP_Post Object
    (
        [ID] => 229
        [post_author] => 3
        [post_date] => 2014-01-17 04:25:49
        [post_date_gmt] => 2014-01-17 09:25:49
        [post_content] => 
        [post_title] => Usability
        [post_excerpt] => 
        [post_status] => publish
        [comment_status] => closed
        [ping_status] => closed
        [post_password] => 
        [post_name] => usability
        [to_ping] => 
        [pinged] => 
        [post_modified] => 2014-01-20 09:46:18
        [post_modified_gmt] => 2014-01-20 14:46:18
        [post_content_filtered] => 
        [post_parent] => 0
        [menu_order] => 0
        [post_type] => values
        [post_mime_type] => 
        [comment_count] => 0
        [filter] => raw
    )

    I’ve been trying to get 229, 233, 150, 239, 134, 221, 223, because I was able to echo it once…

                        
    <?php 
    // Values this strategy does NOT impact
    // strategy_impact = repeater
    // impact_value_select = post_object
    // custom_value_description = text not used here, but elsewhere           
                        if ( get_field('strategy_impact') ): ?>
                            <?php while(has_sub_field('strategy_impact')) : ?>
                            <?php 
                                $impact_values = get_sub_field('impact_value_select'); 
                                $impact_IDs = array($impact_values->ID);
                                $impact_IDs_comma = implode(",", $impact_IDs); ?>
                            <?php $the_thing = $impact_values->ID.','; ?>
                            <?php
                            echo $the_thing
                            ?>
                        <?php endwhile; ?>  
    

    I get 229, 233, 150, 239, 134, 221, 223,

    I wish I could get that into the “post__not_in” parameter, but after the endwhile …

    Sorry if I’m going the taking the long route in the wrong direction.

    What I’m really trying to accomplish is to get a full list of the “values” post_type but change the class/appearance of the posts based on whether or not they are post_objects of the current page, as determined by the strategy_impact sub-field.

    Even if what I’m trying here works, it’s not the ideal way to do it because it generates two lists instead of one — one that’s all the objects, one that’s not all the objects — instead of one list where objects are given different classes than the others.

  • Thanks for the reply. I tried this:

    'post__not_in' => array($impact_IDs)'

    Where

    $impact_values = get_sub_field('impact_value_select');
    $impact_IDs = array($impact_values->ID.',');

    So, I’m not using implode, but that only knocks of the first post_object with the first ID.

  • I tried this, but no luck. There are 12 $values.

    $noImpact = new WP_Query( 
                                array(
                                    'numberposts'  => 12,
                                    'post_type'    => 'values',
                                    'post__not_in' => array($impact_IDs_comma)
                                ) 
                            );
                            while ($noImpact->have_posts()) : $noImpact->the_post(); ?>
                            <h4><strong><a href="<?php echo get_permalink(); ?>" class="text-disabled">
                            <i class="fui-check-inverted text-disabled"></i> 
                            <?php the_title(); ?></a></strong></h4> 

    My list of $values post_objects of $strategies is 7 items long. The list that should only contain unrelated $values is 10 items long, which I don’t understand. I thought it would either be 5 items (good) or 12 (bad) but not 10 (weird).

  • I’m going to try to improve and simplify my question to see if that helps anyone answer.

    1. I have a list of all the $values that impact a $strategy. I got that from the given strategy via repeater field with a post_object select. Cool!

    2. I’m trying to get a list of all the other $values. I want the $values not selected in that repeater field.

    I’m not sure how to get things that aren’t selected. Do I try to “subtract” things that are selected from the full list? Hopefully my comments below help explain.

                        <?php 
    // Query to get $values this $strategy does NOT impact
    // strategy_impact = repeater
    // impact_value_select = post_object
    // custom_value_description = text not used here, but elsewhere           
                        if ( get_field('strategy_impact') ): ?>
                        <div class="col-md-4">
                            <h4>No Impact</h4>
                        <?php while(has_sub_field('strategy_impact')) : ?>
                            <?php 
                            $impact_values = get_sub_field('impact_value_select');
                            $impact_values->post_title;
                            $impact_IDs = array($impact_values->ID);
                            $impact_IDs_comma = implode(",", $impact_IDs);
    //                      $custom_value_description = get_sub_field('custom_value_description');
    
                            // echo $impact_IDs_comma; 
                            // above results in a list of numbers 229 233 150 239 134 221 223 
                            // I thought it would give me commas like 229,233,150...
    
                            echo$impact_values->ID.',';
                            // above gives me 229, 233, 150, 239, 134, 221, 223,
                            // in order to get "a list of all UNselected non-post_object posts of this post_type" I thought I could use that as a 'post__not_in' parameter in a WP_Query, but it's not working 
    
                            ?>
    <?php /*                        $args = array (
                                'numberposts'   => '-1',
                                'orderby'       => 'title',
                                'order'         => 'ASC',
                                'post_type'     => 'values',
                                'post__not_in'  => $impact_IDs_comma
                                );
                            $all_values = new WP_Query( $args);
                            if ( $the_query->have_posts() ) : 
                            while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
                            <h2><?php the_title(); ?></h2>
    <?php endwhile; ?><?php endif; ?>
    */?>
                            <?php endwhile; ?>
                         </div>
                        <?php endif; ?>
  • Hi guys,

    Just wanted to say that this post helped me out a lot. I reference you in this post over here. I hesitate to recommend my route to others as I’m not sure it’s the most efficient way to get the desired result… but it does get the result I was looking for.

    Thanks

    My post about trying to get relationship-related post’s or post_object’s fields out of repeater fields.

  • [Edited to remove sleepy mistakes…]

    Elliot, thanks again for the info. For anyone who is interested, I wanted to post some code here that worked for me in using a post_object within a repeater. I had originally started this way but couldn’t find many examples on post_object syntax to copy… That’s why I went with the relationship in a repeater.

    Your example for a relationship within a repeater worked for sure, but the interface was actually a little bit difficult for my editor to figure out because it allows multiple entries within one repeater row. The single-select post_object seems better to me because we want just 1. related case A, custom description A … 2. related case B, custom description B.

    Here is my first pass at adapting code from this other question about post objects in repeaters. I’m probably doing a number of things wrong here (I run it twice, there are probably unused variables), but I get the result I’m looking for, at 3am no less! If anyone cares to optimize or correct me, please feel free!

    THANKS

    
    <!-- CASE STUDIES 
    ================================== -->
    <?php 
    if ( get_field('strategy_case_studies') ): ?>
    <section class="valueCaseStudies">
        <div class="container">
            <div class="row">
                <div class="col-md-8">
                    <h3>INTERNAL Case Studies</h3>
                    <div class="row">
                
                <?php while( has_sub_field('strategy_case_studies')) 
                { ?>
    
                <?php 
                    $the_case->post_title; //post title of related case selected in repeater
                    $case_type = get_field('case_study_type', $the_case); // internal or external
                    $the_case = get_sub_field('s_cs_select'); // the repeater
                    $case_desc = get_sub_field('s_cs_description'); // the custom description
                ?>
                    <?php if ( $case_type == 'Internal' ) { ?>
                            <div class="col-md-6">
                                <p><strong><?php echo get_the_title($the_case->ID);  ?></strong>
                                <br /><?php echo $case_desc; ?> 
                                <a href="<?php echo get_permalink($the_case->ID); ?>">(link)</a>
                                </p>
                            </div>                
                    <?php } else {} ?>
                    <?php } ?>                
                    </div>
                </div>
                <?php endif; ?>
                <?php if ( get_field('strategy_case_studies') ): ?>
                <div class="col-md-4">
                    <h3>EXTERNAL Case Studies</h3>
                <?php while( has_sub_field('strategy_case_studies')) 
                { ?>
                <?php 
                    $the_case->post_title; //post title
                    $the_case = get_sub_field('s_cs_select');
                    $case_type = get_field('case_study_type', $the_case);
                    $case_desc = get_sub_field('s_cs_description');
                ?>
                <?php if ( $case_type == 'External' ) { 
    // trying to display internal and external types separately was hard to figure out ... this is probably not the best way 
    ?>            
                    <p><strong><?php echo get_the_title($the_case->ID);  ?></strong>
                    <br /><?php echo $case_desc; ?> 
                    <a href="<?php echo get_permalink($the_case->ID); ?>">(link)</a>
                    </p>
                <?php } else {} ?>
                <?php } ?>                
                </div>    
            </div>
        </div>
    </section>
    <?php endif; ?>
    
  • Thanks, man! I’m going to go plug that into some more templates.

    Array pop!

  • Thanks, @elliot. I’ll definitely duplicate this for the External cases query.

    I’m trying to combine these queries but not sure how. The repeater provides a way for us to select multiple cases’ values (title and custom field (link)) for the page and add custom descriptions to each of those.

    If it wasn’t for the custom descriptions, I would just use a relationship field, yes.

    1. Get cases’ titles and custom_field_link
    2. Put a custom description to each case
    3. Divide these listings up in the layout as internal and external

    Sorry if I’m making it more confusing than it needs to be. Love these plugins.

Viewing 15 posts - 1 through 15 (of 15 total)