Support

Account

Home Forums Search Search Results for 'q'

Search Results for 'q'

reply

  • Hi @fatnjazzy

    Thanks for the question but I am not sure I understand it correctly.

    I would however like to point out that field groups registered via code are not visible through the ‘Field Group Edit Page’ maybe that is why you could be wondering if they have been saved in the database.

  • Hi @dcooney

    There was a bug on version 5.1.5 that was affecting the loading of select2 I believe this is related.

    The bug was fixed on the next update 5.1.6.

    You can also use the acf/input/admin_enqueue_scripts action to register / deregister / enqueue / dequeue styles

    You can check out more info on this action here: http://www.advancedcustomfields.com/resources/acfinputadmin_enqueue_scripts/

  • Sorry für die späte antwort:
    bin ziemlich stark mit Arbeit ausgelastet, daher fehlt mir auch die zeit genauer auf dein Problem einzugehen.

    Die Hauptfrage ist: was passiert wenn 2.2.6 ausgewält ist?
    solange es nur auswirkungen auf 2.2.x hat ist es nicht sehr schwer.
    wenn es jedoch auswirkungen auf ausgaben im repeater darüber hat wird es kompliziert.

    because you use a checkbox inside a repeater it use sub_field.
    use this code inside your 2.2 repeater loop:

    //multi option checkbox
    if( in_array( 'fonts', get_sub_field('abteilung') ) )
    {
        //... 
    echo "fonts is checked";
    }
    //single option checkbox
    if(get_sub_field('abteilung') == 'fonts')
    {
        //... 
    echo "fonts is checked";
    }

    that should work and i hope that it help you to build what you like

    je nach dem was du genau vorhast, wäre es evtl. sinvoller das ganze anders aufzubauen. um das zu beurteilen fehlt mir jedoch die zeit (zudem wären zusätliche bzw. genauere angaben nötig)

  • Hi @noma,

    Thank you for the question.

    Is this happening on a local or live server?

    Is it possible to create a new user for me so that I can take a look? Please remember to mark your response as private when sending the credentials.

  • Hi @sternsbergerm

    Thank you for bringing this issue to our attention.

    It is always recommended to use unique field names for your fields, however the idea of a validation warning for duplicate field names sounds neat and I will pass this on to Elliot.

    Hopefully this will see it way into the plugin sometime soon 🙂

  • This isn’t going to be possible using the standard ACF relationship field.

    Even if there was a filter hook available to return the posts you’d need to search the post type that is related to the post type and then do a reverse relationship query to return the posts in the first post type. My head hurts thinking about it 🙂

  • This is very similar to another thread about filtering users. I think that things like this are in the works.

    The other question is here: http://support.advancedcustomfields.com/forums/topic/adding-image-to-the-relational-user-select-field/.

    I’m sure that when Elliot works on that he will consider all of the other places that people might like these filters.

  • Hi @dnavarrojr

    Thank you for the feature request.

    The issue has been forwarded to the developer for consideration and hopefully this feature will see it way in to the plugin sometime soon 🙂

  • Hi @mallander

    There is WP plugin that extends the ACF functionality and allows you to add the custom fields to the Quick edit screen.

    You can check it out here: https://github.com/mcguffin/acf-quick-edit-fields

    I hope this helps 🙂

  • Hi @eafarooqi

    Thank you for submitting this bug report.

    This was a persistent bug but it has since been fixed in the latest version 🙂

  • Hi @mvital

    This issue is very strange the above code should be able to work. You should try to investigate whether there could be a plugin conflict that could be affecting the loading of the map on the front end.

    I would also suggest using an iframe to try and display the field using the following example code:

    <iframe width="400" height="400" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.ca/maps?center=<?php the_field('mapa'); ?>&q=<?php the_field('maps'); ?>&zoom=14&size=300x300&output=embed&iwloc=near"></iframe><br />

  • Hi @projecthh

    You can make use of the acf/fields/relationship/query hook to modify the $args array which is used to query the posts shown in the the relationship field list.

    You can have something as follows:

    <?php
    
    function my_relationship_query( $args, $field, $post )
    {
        // increase the posts per page
        $args['posts_per_page'] = 25;
    
        return $args;
    }
    
    add_filter('acf/fields/relationship/query', 'my_relationship_query', 10, 3);

    You can read up on this here: http://www.advancedcustomfields.com/resources/acf-fields-relationship-query/

  • Hi @spen


    @brugman
    solution should be able to solve the issue since having posts_per_page set to -1 allows us to display an unlimited number of results. You could also add a ‘&’ and then another parameter after “posts_per_page=-1″ to further alter the query.

    The following could also work :

    $args = array(
        'posts_per_page' => a'-1',
        );
    query_posts( $args );
  • Hi @sebastian-pisula,

    Thank you for the suggestion.

    This would really make a nice addition to the plugin and in light of this, the information has been sent to the developer for consideration.

    I would however suggest you post any feature requests under this category.

  • Hi James

    Thanks for getting back to me. Sorry I wasn’t more specific in my question. It isn’t the jQuery tabs I needed; it was the ability to add or filter the checkbox choices “on-the-fly” using the ajax input.

    Thanks.

    John

  • Try this
    function get_post_ids_within_range(){
    global $wpdb;
    $datenow = date(time());
    $post__in = array();

    $post_type = “properties”;
    $acf_pref = “kidum_”;

    $sql = ”
    SELECT post_id,
    substring_index(meta_key,’_’,2) as field_joiner,
    max( case when substring_index(meta_key,’_’,-1) = ‘from’ AND UNIX_TIMESTAMP(meta_value) <= $datenow then meta_value end) as date_from,
    max( case when substring_index(meta_key,’_’,-1) = ‘to’ AND UNIX_TIMESTAMP(meta_value) >= $datenow then meta_value end) as date_to
    FROM $wpdb->postmeta
    WHERE meta_key LIKE ‘$acf_pref%’
    AND post_id IN(SELECT ID FROM $wpdb->posts WHERE post_type='{$post_type}’ AND post_status=’publish’)
    GROUP BY post_id,field_joiner
    having date_to <> ” AND date_from <> ”
    ” ;

    $rows = $wpdb->get_results($sql);

    foreach($rows as $row){
    $post__in[] = $row->post_id;
    }

    return $post__in;
    }

  • Hi @crixlet

    I use the following practice for the saving of my fields.

    For the field labels I always use unique field names that are descriptive of the custom fields. As for the field names, since when saving sub fields, the ‘save name’ is generated by the ancestors names + the row index, I always try to keep them short and unique.

  • Hi @davidw

    I am not quite familiar with the Builpress Theme but this might what is causing the issue. I would recommend you begin by switching to one of the default WP themes and if the ACF plugin appears then you will need to look for custom functions in the theme files that would be hiding the ACF plugin in the Builpress theme.

    You can hide the admin panel using the following function:

    add_filter('acf/settings/show_admin', '__return_false');

  • Hi @tkapler

    ACF uses the field name to save its data and thus to avoid data loss and also enable synchronization of your fields it is recommended to enable field group translation.

    Each language will require it’s own translation of a field group. You should create your field group in the default language and then use the ‘Duplicate’ tool to create a duplicate field group in the new language. You can then edit the field’s label, settings but the field’s name must remain constant across all translations.

  • But you have the filtering working?

    As far as the repeating tags, do you mean this part of your code is?

    
    <ul id="filters" class="filter-menu">
            <?php while ( $postlist->have_posts() ) : $postlist->the_post(); ?>
                    <?php $posttags = get_the_tags();
                            echo '<li><a href="#" class="active" data-filter="*">Alles</a></li>';
                            if ($posttags) {
                                    foreach($posttags as $tag) {
                                            echo '<li><a href="#" data-filter="' . '.' . $tag->name . '">' . $tag->name . '</a></li>';
                                    }
                            }
                            ?>
                    <?php endwhile; ?>
            </ul>
    
  • The easiest way is to add a meta_key and orderby to your args

    
    $args = array(
        'post_type' => 'propriedades',
        'meta_key' => 'price_field_name',
        'orderby' => 'meta_value_num',
        'order' => 'DESC',
        'meta_query' => array(
            'relation' => 'AND',
            array(
                'key' => 'tipo_de_propriedade',
                'value' => 'Apartamento',
                'compare' => '='
            ),
    
            array(
                'key' => 'dormitorios_do_imóvel',
                'value' => '3 Dormitórios',
                'compare' => '='
            )
    		
        )
    );
    
  • You add filters and actions.

    I’m pretty sure this is all in the documentation somewhere so this is just a quick overview.

    Examples:

    
    // add options pages
    add_action('init', 'add_theme_options_pages');
    function add_theme_options_pages() {
        if (!function_exists('acf_add_options_sub_page')) {
            return;
        }
        // add code here to add options pages
    }
    
    
    // add custom fields
    // export the field groups and use below
    add_action('acf/include_fields', 'add_theme_field_groups');
    function add_theme_field_groups() {
        // you can get the code you need here by exporting
        // your field group to PHP
        // you could also use JSON, search for ACF Local JSON
    }
    

    Hope this helps.

  • Hi guys

    Thanks for the feature request. I like it and will add it in!

    Cheers
    E

  • A solution to set hidden/disabled attribute on a regular field would be helpful when creating front-end forms for submitting data.

    Example:

    Filling an inquiry form for a product, the populated acf_form in the front end can grab current ID from product page and pre fill an ACF Post Object type with it’s current ID.

    Maybe this settings can be available in the acf_form() options arguments when populating the form or via load_field/name={$fieldname} filter

    Somthing like:

    
    
    add_filter('acf/load_field/name=property','wc_set_field');
    function wc_set_field($field){
    		
    		if( !is_admin() && is_single() ){
    			$pid = get_the_ID();
    			$field['default_value'] = $pid;
    			$field['disabled'] = true;
    			$field['hidden'] = true;
    		}
    
    		//same in, same out
    		return $field;	
    }
    

    This way the field value is blocked in the frontend but it can be changed using the regular backend edit screen normally without changing its field type.

    I see myself using ACF a lot to solve front end forms. This feature can help create relations easier.

    Thanks for the great work on ACF.

  • One more follow-up question:

    Right now I have a select field with options like “Martin (MN)”. The only reason I have (MN) included is so A) if there were a Martin MN and a Martin WI, these two choices would be different, and B) so the user can tell the difference while selecting counties. However, when displaying the field on my site, I only want to display the name “Martin”, and not “(MN)”. Is the only real solution here some sort of PHP string function, like somehow not displaying the last 5 characters of any county field?

    Thanks again.

Viewing 25 results - 16,676 through 16,700 (of 21,330 total)