Support

Account

Forum Replies Created

  • HARH, this seems completely lame … someone obviously missed the whole picture, when ‘designing’ get_field();

  • True. I’ll see what I can come up with.

    To me this feature seem like mandatory, as selecting one item in one dropdown have an effect on a second drop down with related options seem like old school user interface.

    It seems weird functionality like this should turn into an it project.

  • Now, those hard coded field ids (field_579376f522130) worries me a bit. These will have to change with every time I need to make this modification, right?

    It seems non dynamic … so, I guess I’ll have to that the long road and learn to actually extend ACF Pro itself … sigh!

  • Hmm, seems to partially work (needs stripping of weird markup mess for the excerpt) when changing:

    data = this.o;

    to

    data = this.data

    by checking the ACF API …

  • Well, I think I’m in for bumpy ride here. First I had to change:

    var myACFextension = acf.ajax.extend({

    to
    var myACFextension = new acf.Model({

    to get the script to not throw: acf.ajax.extend is not a function error.

    Now, I’m facing this:
    e.$el is undefined

    I guess these scripts haven’t been updated in a while, right?

  • Or should/could I maybe create a custom Taxonomy consisting of the car models and somehow inject that?

  • Hmm, so where would I put this? I’m in the admin area … so I’d have to make some kind of plugin for this, or?

  • I’m facing the exact same issue of not being able to filter by ANY custom post type. Have you figured anything out in relation to this that you’d like to share?

  • How do I apply this to dynamic filtering parameters?

    This all seem very hardcoded. I’ve added to filtering dropdowns to my (custom) posts in the admin for filtering on Office and Division. How do I get the paramst from the query ($_GET[‘offices] and $_GET[‘divisions’]) and add them to the query!?

  • Seems to be found under: Profile > Topics started. Hope this helps.

  • Bummer, forgot to actually switch to the theme … (facepalm) sigh, works!

  • Well, nothing gets saved to the acf-json folder!? I even tried adding the custom script to my functions.php file, but nothing gets saved.

    WHAT do I have to do to get this to work? Reading the page on the subject doesn’t cut it. And the read/write settings to the folder should also be ok.

  • Thanks, just what I was looking for.

  • OK, added two date date picker fields, and used the conditional login switch based on values from the radio button group.

  • Thanks John, managed to get this working using a plugin and the pre_get_posts filter. But man, does one spend time googling stuff …

  • Well, missed the $footer_id in the while loop …

  • Thanks John, yeah just iterated the bugger. Was just wondering whether I’d be missing some obvious fancy way of getting the values.

  • OK, found this out after banging my head at the wall: Am I right if I say that when setting up posts I have to use the exact characters ‘$post’?

    I was trying to: foreach ( $principles as $principle ) : setup_post( $principle ).

    Then: echo get_field(‘principle_link);

    And doing that I got nothing, it wasn’t until I (again, a reaction of desperation) changed it all to $posts and $post … !?

    Am I being struck by bad luck, or is this how WP is SUPPOSED to work!?

  • Oh sorry, John, thought I was on a different post. I managed this last night after about five or six hours of work, randomly trying all combinations of field_value, term_id, slug … I could think of. Well, the lot. For HOURS. So frankly I don’t know what actually made it work, as it’s all very random to me. All I know is that I ended up with an extremely long script where I call the database multiple times. And to be honest, I don’t think it’s good for performance, at all.

    And now AGAIN (different project) I can’t get simple fields from a custom post type. It somehow turns into a bleedin’ nightmare every time I (try) use this plugin … and I seriously cannot grasp why.

    I just sent a ticket (again) for the exact same issue I start out with every time I use this plugins. It’s really sad, actually.

  • Hi John, how do I do that?

  • So, a guy on wordpress.stackexchange.com gave me this hint:

    $args_jewellery = array(
        'post_type' => 'jewellery',
        'numberposts'   => -1,
        'meta_query' => array(
            array(
                'key' => 'select_brands',
                'value' => '"' . $brand . '"',
                'compare' => 'LIKE'
            )
        )
    );

    Now, why would it take me three days to wrap that shit in quotation marks and use LIKE?

    Sigh!

  • I’ve created a Field Group called Brands, in that field group I’ve added a field with a field name of ‘select_brands’ of type Checkbox (to be able to select multiple). In the choices I’ve added this:

    
    bolou : Bolou
    c6 : C6
    deakin francis : Deakin Francis
    fope : FOPE
    piero milano : Piero Milano
    

    From this I generate a drop down on the front page, along a second drop down generated from categories (the built in widget in the admin interface).

    So, now I can pick – from two different drop downs – a combination of both Brand and Category. But, – I’ve now tried for three days to get the posts from the DB without any luck (yes, luck is actually what I’m counting on now, ’cause nothing seem to make sense).

    Now, from the 3.456.745 different versions of an $args array I’ve tried, none work. Now, I need some help understanding what parameters I actually need to put where, as I simply can’t grasp why this is so hard to get going.

    I would expect the following to get me; posts of custom post type ‘jewellery’ with a category of whatever is selected in the category drop down ($category is an integer from the option value in the drop down) that is also of a specific Brand ($brand is a string from the above options from the custom field).

    
    $args_jewellery = array(
    	'post_type' => 'jewellery',
    	'numberposts'	=> -1,
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'category',
    			'terms' => array( $category )
    		)
    	),
    	'meta_query' => array(
    		array(
    			'key' => 'select_brands', <-- IS THIS RIGHT?
    			'value' => $brand <-- AND IS THIS?
    		)
    	)
    );
    

    How do the fields below relate to my custom post type and its value?

    'meta_query' => array(
    	array(
    		'key' => 'select_brands', <-- ?
    		'value' => $brand <-- ?
    	)
    )
    

    And WHY isn’t this working? What is it that I’m totally missing here … ?

  • Yeah, huh? How does that work? I simply cannot figure out where to edit multiple custom post type using it. Is there a written manual somewhere!?

  • And the day after: Screen Options in the admin interface. Check Field Keys!

  • I’m using trial and error with values I know exists:

    But no matter what I put it, I still get nothing:

    $args_jewellery = array(
    	'post_type' => 'jewellery',
    	'numberposts'	=> -1,
    	'tax_query' => array(
    		array(
    			'taxonomy' => 'category',
    			'terms' => array( 6 ) // Also tried category name as string 'Ringe', no difference
    		)
    	),
    	'meta_query' => array(
    		array(
    			'key' => 'select_brands',
    			'value' => 'bolou'
    		)
    	)
    );
    

    If I remove the meta_query part I get all rings. But why isn’t the meta_query part working – these are values I know exists. But I don’t know if that’s what I’m supposed to use!?

    ANY help is appreciated!

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