Support

Account

Home Forums Search Search Results for 'q'

Search Results for 'q'

reply

  • As per
    This article sounds like we can expect it pretty soon.

    Now, back to work on conditional / required sub fields in Version 4.3.0!

  • Hi williamotto,

    Well as I said this happens locally (on my machine during development)…for the live version I’ll be using “AWS” with caching (that will work for some areas).

    This is just for the GET request… and this is the amount of images I have..

    As soon as I remove the ACF code it works great.

    Well I’m making use of get_template_part for loading some “partials” but I don’t think that’s the issue…as for the ACF code I’m pretty sure it’s clean.

  • the first thing that comes to mind is how large is the image/images that are in the slider? if they are really big that could be causing your problems. I would hesitate to blame the repeater field as i have had nested repeater fields with hundreds of inner-fields on sites and never noticed a slow down.

    one thing that really helped me solve the slowness is to use the Network section of the Developer Tools (Chrome, but firebug for firefox does the same if not more). I was able to locate what exact files that were causing the lag and then adjusted/shrank them down to help. another great resource is http://www.webpagetest.org/

    another option is to contact your hosting provider and see if there is anything they can do. i had one site with average load time was almost ten seconds! one weekend the hosting company did server maintenance and did some resets etc. and my site was back down to average load time of 1-2 seconds, even with php/sql heavy templates.

  • Hi Christopher.

    What exactly are you trying to achieve?
    You cant query an acf field like you query wp_query since it’s just plain data in an array/string/object.

  • I’d say it very much depends on how advanced you want the function to be.. and user friendly.

    I think the way you imagine it could work.. but to make it easier for you you could add a html-field at the end of the repeater row with an a -tag which you hook up your custom script to.. that way you wont have to hack anything into the repeater.

    You’ll have to do some custom javascript obviously.. do this by adding a filter to admin_head:
    http://stackoverflow.com/questions/3326967/how-to-add-custom-javascript-to-wordpress-admin

    With the script I suppose you’ll just have to be able to integrate that script you’ve linked.. then have it output the coordinates into the appropriate fields..

    I don’t think you’ll have to publish the post with the image before using the script/popup. You’ll retrieve the image when the user actually click the “add coordinates” popup-link anyway so as long as there’s an image there in the code your fine.

    I have to say this is a deucy and it’d be interesting to make it into a plugin.. I haven’t had use for a function like this myself but I’ve seen this being used on occasion.

  • Terms and Conditions

    “Using ACF in a theme

    Including the (free) Advanced Custom Fields plugin inside a free / premium theme is allowed.
    You can include your (premium) purchased add-ons within a premium theme as long as it is made clear in the copyright / information that the add-ons are NOT to be used or distributed outside of the premium theme.
    You can not include (premium) purchased add-ons within a free theme.”

  • Here it is !

    I try numberposts whithout success, I don’t know if it’s important but for your information the select field list custom posts type.

    add_filter('acf/fields/post_object/query/key=*my_field_key*', 'change_posts_order', 10, 3);
    
    function change_posts_order( $args, $field, $post )
    {
    
        $args['numberposts'] = 7;
        $args['sort_order'] = 'DESC';
        $args['sort_column']  = 'date';
        $args['orderby'] = 'date';
        $args['order'] = 'date';
        $args['post_status'] = 'publish';
    
        return $args;
    }

    Thanks

  • Your license states the following:

    “This premium Add-ons has a multi-site license!

    You may use this add-on in multiple any website projects

    You may include this add-on in a premium (not free) WP theme or Plugin”

    You are telling me now that i cannot use this ADD-ON in a Premium (not free) WP Theme. How much do i have to wait until i can use it?

  • I tried but it didn’t work. Maybe you could change the code the way I used the repeater fields?

    <?php $attachment_id = get_field('liveticker_logo_heim', 'option');
                                      $size = 'medium'; // (thumbnail, medium, large, full or custom size)
                                      echo wp_get_attachment_image( $attachment_id, $size );
                                ?>
                                </div>
                                <div class="logo_gast">
                                    <?php $attachment_id = get_field('liveticker_logo_gast', 'option');
                                          $size = 'medium'; // (thumbnail, medium, large, full or custom size)
                                          echo wp_get_attachment_image( $attachment_id, $size );
                                    ?>
                                </div>
                                <div class="clear"></div>
                                <div class="ergebnis">
                                <div class="tore_heim"><?php the_field( "liveticker_tore_heim", 'option' );?></div>
                                <div class="ergebnis_zeichen">:</div>
                                <div class="tore_gast"><?php the_field( "liveticker_tore_gast", 'option' );?></div>
                                </div>
                                <div class="clear"></div>
                            </div>
                        </div>
                        <div class="liveticker_box">
    					<?php if(get_field('spielverlauf', 'option')): ?>
      						<?php while(has_sub_field('spielverlauf', 'option')): ?>
                            <div class="liveticker_wrapper">
    						<ul>
                                	<li class="liveticker_ergebnis">
                                    	<?php if(get_sub_field('minute')) : ?>
                                        <p><?php the_sub_field('minute');?>. Minute<br/>
                                        <?php else : ?><br/>
                                        <?php endif ;?>
                                        <?php if(get_sub_field('liveticker_tore_heim')) : ?>
                                        <?php the_sub_field('liveticker_tore_heim');?> : <?php the_sub_field('liveticker_tore_gast');?></p>
                                        <?php else : ?>
                                        <?php endif ;?>
  • Can you not simply use the first row of the repeater:

    <?php
     
    $rows = get_field('repeater_field_name' ); // get all the rows
    $first_row = $rows[0]; // get the first row
    $first_row_image = $first_row['sub_field_name' ]; // get the sub field value 
     
    // Note
    // $first_row_image = 123 (image ID)
     
    $image = wp_get_attachment_image_src( $first_row_image, 'full' );
    // url = $image[0];
    // width = $image[1];
    // height = $image[2];
    ?>
    <img src="<?php echo $image[0]; ?>" />

    Taken from here: Repeater Documentation

  • This reply has been marked as private.
  • Hi @Fulvio

    Thanks for all the information. It seems like your requirements are a bit too custom for the standard ACF functionality.

    Perhaps you could think about writing a new field type that uploads the image to somewhere else? This way you could have full control over the functionality.

    You will find articles and a starter kit on the resources page

    Thanks
    E

  • Hi @matthewheck

    Have you tried remove_menu_page('acf-options-course-settings'); ?

  • Hi @Evzin

    The repeater field and flexible content field are yet to receive updates which include a removable update script. Until then, you will not be able to distribute your theme.

    Thanks
    E

  • Hi @alexanderwallin

    Thanks for the feature request. About 2 days ago, I added this into the code with 2 new events being triggered. These are:

    acf/conditional_logic/show
    acf/conditional_logic/hide

    Both of them send through the $field element which is being targeted and also the rule which calculated the hide/show!

    This will be part of the next version, and you can find the code in the latest build on github!

    Cheers
    E

  • Hi @Romain9p

    Looking at the source code, you need to use the numberposts param.
    If that doesn’t work, perhaps the filter is not running correctly.

    Can you post your code?

    Thanks
    E

  • Hi @johnhillcoat

    If a ‘category’ is a standard WP taxonomy, then I don’t think this is an ACF question.

    You should ask general WP questions on a WP forum such as stack overflow.

    Thanks
    E

  • Hi @chrisfry

    Sounds like you need to use a counter variable to dynamicaly echo the row number. You can do this like so:

    <?php if(get_field('menu_item')): $i = 0; ?>
    <?php while(has_sub_field('menu_item')): $i++; ?>
    	
    	<div id="test-<?php echo $i; ?>">
    		
    	</div>
    	
    <?php endwhile; ?>
    <?php endif; ?>

    Note that the variable $i will increment each row, and you can render it with the echo function.

    Does that help?

    Cheers
    E

  • Hi @codynew

    This is not yet possible withe the ACF plugin, however, you could quite easily download and use a jQuery plugin to limit words in a textarea.

    Look at the DOM to find the id of the textarea in question and use this to target the element and add the jQuery word limit functionality.

    Good luck

    Thanks
    E

  • Hi @gminc

    Thanks for the bug report.

    The ACF gallery field uses the native WP media popup to display the field data, then it uses CSS to hide the usual main / side bar layout and only show the sidebar.

    The issue may be that the WP popup contains a bug in regards to user permissions, so can you open up the normal WP popup (via the_content WYSIWYG) and try to edit the image in question using different user accounts?

    Does the WP popup allow you to edit the image?

    Thanks
    E

  • I intent to use Advanced Custom Fields Plugin together with Repeater Field Add-On in a Premium WP Theme and i have a few problems:

    From what i read on this site, i understand that the updates should be disabled after integration in the theme. Here comes my problem.
    If the plugins are integrated in the theme they do not appear anymore in the “plugins” page from WP Dashboard, thus meaning my clients will not have access to updates. In this case do i still have to remove some codes? If i do, what do i have to remove and how?

  • I’ve been trying this for about an hour now with no success.

    I’m trying to remove the ACF generated “Options” menu from my Dashboard and all subsequent submenus.

    I have tried using the above code provided:

    add_action( 'admin_init', 'hide_acf_options_menu', 99 );
    function hide_acf_options_menu(){
    
    	remove_menu_page('acf-options');
    
    }

    As well as a few variations that include using the hook “admin_menu”, trying out variations on the menu slug based on a print_r:

    Array ( [title] => Course Settings [menu] => Options [slug] => acf-options-course-settings [capability] => edit_posts [pages] => Array ( [0] => Array ( [title] => Course Settings [menu] => Course Settings [slug] => acf-options-course-settings [parent] => acf-options-course-settings [capability] => edit_posts ) [1] => Array ( [title] => Appearance Settings [menu] => Appearance Settings [slug] => acf-options-appearance-settings [parent] => acf-options-course-settings [capability] => edit_posts ) [2] => Array ( [title] => Certificate Settings [menu] => Certificate Settings [slug] => acf-options-certificate-settings [parent] => acf-options-course-settings [capability] => edit_posts ) ) [show_parent] => 1 )

    acf-options-course-settings would seem to be the magic menu slug, but nothing is getting rid of this Options menu. Any advice, suggestions, or request for further information would be more than welcome.

  • Next question: Can you change the order that the browse list is sorted by? Looks like it’s alphabetical, which is going to get really annoying for anyone trying to find ten posts in a list of 500.

  • Thanks for your help Elliot. All sorted now.

    <?php
    // INCLUDE ONLY THE MOST IMPORTANT PHOTO TAGS IN THE LIST.
    // 51 - Architecture
    // 52 - Scapes
    // 29 - UK
    // 43 - Interiors
    // 36 - Personal
    // 38 - Commercial
    // 30 - People
    // 'orderby' => 'name',		// sort by name or count (Alphabetical) or count (Most used)
    // 'order' => 'ASC',		// in ASCending or DESCending order
    $types[0] = 'media-tags'; 
    foreach ($types as $type) { 
     $terms = get_terms($type, array('name_like' => "a", 'order' => 'DESC', 'orderby' => 'count', 'include' => '51,52,29,43,36,38,30') ); 
     if ($terms) { 
      foreach($terms as $term)  { 
    	$image = wp_get_attachment_image_src(get_field('term_thumbnail', 'media-tags_'.$term->term_id.''), 'thumbnail');
    	$genreDescription = get_field('genre_description', 'media-tags_'.$term->term_id.'');
    	$moduleClass = get_field('moduleclass', 'media-tags_'.$term->term_id.'');
    
    	echo '
    	<li class="'.$moduleClass.'  block project">
    		<a href="/archive/photographs/'.$term->slug.'">';
       echo '<img src="'.$image[0].'"/>
       <div>
    								<div>
    									<h2>'.$term->name.'</h2>
    									'.$genreDescription.'
    								</div>
    							</div>
    							</a>
    						</li>';
    						}
    					}
    				}
    				?>
Viewing 25 results - 20,376 through 20,400 (of 21,339 total)