Post Title Not showing up

Add: $first_attachment = reset($attachments); $first_attachment_id = $first_attachment->ID; $first_attachment_title = $first_attachment->post_title; Below: $nbImg = count($attachments); Now you are able to return the link with: echo wp_get_attachment_link( $first_attachment_id, ” , true, false, $first_attachment_title ); If you need a sort of custom link markup, you can have a look at the related functions: http://codex.wordpress.org/Function_Reference/wp_get_attachment_link Edit: There is no … Read more

Custom field within shortcode

If you want to put the custom fields inside the shortcode…you actually should put the custom fields inside the shortcode. Be sure that your fields content does not get echoed, according to ACFs resources you have to use get_field($field_name) within the loop. Try: <?php echo print_wp_cart_button_for_product(get_field(‘product_name’), get_field(‘product_price’)); ?>

Can’t upload files

Apparently this is a new WordPress bug (I’m using version 3.5.2). Just set wp_debug to false and it works perfectly again. Hopefully they’ll fix this soon. define(‘WP_DEBUG’, false);

the_post_thumbnail unless video id is added

I think all you need is this: <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> if (get_field(‘channel’) == ‘Youtube’) { echo get_field(‘youtube_video_id’); } elseif (get_field(‘channel’) == ‘Vimeo’) { echo get_field(‘vimeo_video_id’); } elseif ( has_post_thumbnail()) { the_post_thumbnail(); } That should use a Youtube video, then a Vimeo video, then the thumbnail, … Read more