Im using a plugin called wp carousel to display custom post types in a carousel in the footer in the singular view of posts. By default the plugin gets the featured image and the title of the post, but i want to add a custom field (plain text) I've added to the custom post type through ACF.

I've tried adding this to plugins/wp-carousel/themes/default/theme-jcarousel.php

<?php global $post;
$sidans_id = $post->post_id;
$hamta_kund = get_field('kund');
echo $hamta_kund;

on line 192 (right after the code that gets the title.

What this does is get the currently viewed posts' custom field, I want to get the custom field that is associated with each post in the carousel. So every item in the carousel gets the same value (the value from the one im currently viewing).

Do anyone know what im doing wrong?

This is some documentation from the plugin-author. http://sumolari.com/proyecto/wp-carousel/wp-carousel-documentacion-docs/

I've tried the support forum but no answer and im running out of time with the client.

1 Answer 1


You should use get_post_meta($sidans_id, 'kund', true); instead. The get_field call is using the ID from the post loop and not from global.

  • Thank you for pointing that out, for page-id I had to use $item['ID'] to get the current Id from the plugin.
    – talven
    Jun 12, 2013 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.