custom fields – adding images with links
-
I have Scott Reilly’s Get Custom Field Values (3.3.2) plugin installed. I have been using it for some time to add text to specified posts. And it has been working brilliantly.
An example of what I’m trying to achieve is on the list at the top of this page: etherwork.net/blog/?p=1671 (URL purposely left unlinked in an attempt to prevent spammers) I would like to add the image of the book and the offsite link to more information on the book via custom fields rather than hardcoding it into the post (I had to use awkward CSS to try to position the image.)
As you may have guessed, I know just enough about coding to get myself in trouble. I’ve stared, to no avail, at various tutorials including the codex sections on adding images using custom fields.
This is as far as I’ve gotten by adding the image fields to the c2c_get_custom coding on my index page:
`if (function_exists(‘c2c_get_custom’)) {
echo c2c_get_custom(‘imageURL’, ‘<a href=”‘, ‘ ” title=”offsite link”>’); //not working
echo c2c_get_custom(‘image’, ‘<img src=”/wp-images/’, ‘” class=”imgright” style=”border-style:outset;” /></a>’); // not working
echo ‘<ul class=”post-meta”>’;
echo ‘<li style=”height:0 !important; padding:0; margin:0; border:0 !important; list-style:none !important;background:#def; display:inline;”></li>’;
echo c2c_get_custom(‘Date of Publication’, ‘<li>’, ‘</li>’);
echo c2c_get_custom(‘Publication’, ‘<li class=”publication”><strong>’, ‘</strong></li>’);
echo c2c_get_custom(‘Publication Title’, ‘<li class=”pubtitle”><strong><small>’, ‘</small></strong></li>’);
echo c2c_get_custom(‘Publication Author’, ‘<li>By ‘, ‘</li>’);
echo c2c_get_custom(‘Publication URL’, ‘<li><small>(<a href=”‘, ‘ ” title=”offsite link” class=”offsite”>learn more by following this link</a>)</small></li>’);Do I have to add those two lines somewhere else to get the custom fields to show in my posting admin area? Thank you for any guidance.
E Morris
WP3.5; Firefox18.0.2; WinXP
- The topic ‘custom fields – adding images with links’ is closed to new replies.