WordPress.org

Ready to get started?Download WordPress

Forums

Front-end Editor
Front End Editor: Editing Custom Field Values Where Image Is Present (6 posts)

  1. Vegas Kev
    Member
    Posted 2 years ago #

    Incredible Plugin, but I'm having an issue, that is probably not the fault of the plugin, per se.

    I have various custom fields. Some of them are text and some of them are not.

    One custom field in particular is a link embedded within an icon. We'll say a facebook icon.

    The purpose of the facebook custom field is for an author to add a facebook page associated with the post. The author does this by adding the facebook url extenstion (not "http://facebook.com/TheFanPage", but rather "TheFanPage"). The reader of the post can then click on the facebook icon and be taken to the fanpage associated with the post.

    The issue is that when I make the custom field editable via your github instructions GIT HUB INSTRUCTIONS, the facebook icon is replaced with the actual custom field value "TheFanPage" instead.

    The replacement is true even if it is not the author logged in looking at the page, it actually replaces my custom field display image with the custom field value.

    http://wordpress.org/extend/plugins/front-end-editor/

  2. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    Please post the exact code you use to display the custom field.

  3. Vegas Kev
    Member
    Posted 2 years ago #

    @Scribu: Thank you for taking a look at my issue. I appreciate your help.

    Here is the code:

    <?php echo $cf_link = get_editable_post_meta($post->ID, 'facebook', 'input', true); if ($cf_link) { ?><a href="<?php echo $cf_link; ?>"><img src="http://mydomain.com/wp-content/themes/demo999theme/images/profile-icons/facebook.png"></a><?php } ?>

    I also tried this code:

    <?php $cf_link = editable_post_meta($post->ID, 'facebook', 'input', true); if ($cf_link) { ?><a href="<?php echo $cf_link; ?>"><img src="http://mydomain.com/wp-content/themes/demo999theme/images/profile-icons/facebook.png"></a><?php } ?>

    Neither of them seem to be suitable. I hope that I've clearly explained my intentions. Again, thank you in advance for your assistance.

  4. scribu
    Member
    Plugin Author

    Posted 2 years ago #

    I'm afraid what you're trying to do is not possible with FEE out of the box.

    You're trying to edit the href attribute of a link, which would require some additional handling.

  5. Vegas Kev
    Member
    Posted 2 years ago #

    dang....any ideas on how bto best approach this situation?

  6. redsoxmaniac2
    Member
    Posted 1 year ago #

    I think a good idea would be to make the fields with the images not editable, but then add the custom fields as text in the post. But the custom fields as text, add a function to make it "admin only" or logged-in users only.

    That way, only the logged-in person who controls the post and/or admin can change the custom field. Once the author changes the custom field text, the custom field will change with the images too. It can just be placed somewhere on the page where it can all be editable.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic