[Resolved] Custom fields
I am using this plugin with the Advanced Custom Fields (acf v.4) plugin. I’ve been able to add custom fields to my content blocks. Now I just need to get them to display in my widget.
I have asked for some assistance on the ACF forum, the develop has come back to me and asked if I have the post_id variable for the content block
At the moment I have had to pass in the post ID in order for the custom field to display in my theme. (Using the Warp theme framework from yootheme).
Here is the code:
<div class="module <?php echo $style; ?> deepest">
<?php echo $badge; ?>
<?php if ($showtitle) echo $title; ?>
<?php echo $content; ?>
<?php the_field('panel_link',803); ?>
<?php the_field(‘panel_link’,803); ?> is my custom field, and 803 is the ID of the post.
Obviously for this to work I can’t hardcode in the ID of the post.
I can see a previous post has asked a similar question but it is marked as resolved so I am unable to comment on it.
Any help, greatly appreciated
- The topic ‘[Resolved] Custom fields’ is closed to new replies.