Support

Account

Forum Replies Created

  • That is the same issue, you need 4 values, not 3.

    So try this:

    $image = get_field('quick_ship');
    	$size = 'full'; // (thumbnail, medium, large, full or custom size)
    	if( $image ) {
    		echo wp_get_attachment_image( $image, $size, "", array ('class' => 'quick-ship' ) );
    	}
  • A non-JS option:
    Just swap out ‘company_detail’ for the name of your WYSIWYG field.
    And set/alter the length of the excerpt by changing the ’32’

    Nice and easy solution. Thanks for posting this.

  • TYPO should be `data-bs-target=”#testimonial_carousel’

  • Thank you, works perfectly and saves me a lot of time!

    //EDIT

    I did have to change data-bs-target="#carouselExampleCaptions" in the next and prev buttons to data-bs-target="#testimonials_carousel to get the next and prev buttons to work.

    Still evry useful off course 😉

  • OK Found it.

    As per the Code reference, the function uses four values:

    wp_get_attachment_image( int $attachment_id, string|array $size = 'thumbnail', bool $icon = false, string|array $attr = '' )

    Where I use only three. If I add the fourth value like so:

    echo wp_get_attachment_image($image, $size, "",array('class' => 'rounded-top') );

    It works. So problem solved.

    What makes it hard to spot the fault is that WP seems to use four values where in this case the four values seem required?

    Anyway, thanks for looking into this and pointing me toward the code reference.

  • Hi John,

    Question: is the class populated with anything?

    I use the class in other places on the site if that is what you mean?

    Possibly there is a filter on ‘wp_get_attachment_image_attributes

    mmhh, I looked for something like that but could not find anything. Are you saying the code is correct and should work?

    I use <?php the_post_thumbnail('large', array('class' => 'rounded-top')); ?> in other places on the site and that works. My rounded-top class is added to the wp-post-image class.

    I tried using

    $image = get_field('card1_image');
    	$size = 'full'; // (thumbnail, medium, large, full or custom size)
    	if( $image ) {
    		echo wp_get_attachment_image( $image, $size, array ('class' => 'rounded-top' ) );
    	}

    In twenty-ten and it does not work either. The only classes I see is attachment-full size-full In the ACF field settings I use the “ID” since I want the srcset thing.

    Thanks

  • Ah, I mixed things up.

    This is what I have now:
    
    $image = get_field('card1_image');
    	$size = 'full'; // (thumbnail, medium, large, full or custom size)
    	if( $image ) {
    		echo wp_get_attachment_image( $image, $size, array ('class' => 'rounded-top' ) );
    	}

    and that does not seem to work…

  • OK,

    the limit to the number of posts was a memory issue
    increasing the memory for WP from 40 to 96MB fixed that

    Thanks!

  • Thanks, that works.

    Only thing is there seems to be a limit to the number of posts that is displayed, more than 50 gives me a server error. any idea what causes this?

    Cheers

  • Hi Elliot,

    I get mails like this:

    A new trackback on the post "Can't edit repeater field, [] operator not supported for strings in repeater.php" is waiting for your approval
    http://support.advancedcustomfields.com/forums/topic/cant-edit-repeater-field-operator-not-supported-for-strings-in-repeater-php/
    
    Website : moncler marseille (IP: 116.21.64.55 , 116.21.64.55)
    URL    : http://duodoune-moncler-prix.ommf.net
    Trackback excerpt: 
    <strong>moncler marseille...</strong>
    
    Hi there, i consider i discovered you frequented my very own site as a result i stumbled on ???return the particular favor????.I'm attempting to discover things to improve my individual world wide web website!I guess the alright to use a quantity of y...
    
    Approve it: http://support.advancedcustomfields.com-admin/comment.php?action=approve&c=122
    Trash it: http://support.advancedcustomfields.com-admin/comment.php?action=trash&c=122
    Spam it: http://support.advancedcustomfields.com-admin/comment.php?action=spam&c=122
    Currently 117 comments are waiting for approval. Please visit the moderation panel:
    http://support.advancedcustomfields.com-admin/edit-comments.php?comment_status=moderated

    This “Can't edit repeater field, [] operator not supported for strings in repeater.php” is my support topic here. Linkspammers are trying to create a trackback/pingback on their spamsite and I am asked to approve it so that it can be placed in this older topic, where it is supposed to link to their site, raise pagerank etc.

    You probably have “Allow linknotifications from other blogs (pingbacks and trackbacks) checked?

    (I messed up the URL of the spammer,so that it does not work)

  • OK, that’s clear now.
    Could be very useful.

    Thanks

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