WordPress.org

Ready to get started?Download WordPress

Ideas

Savable Custom Fields

  1. Shyzer
    Member

    12345

    I make 6-10 posts a day, each with their own custom field that ultimately displays a country flag(s) to let my readers know where each offer is available. It'd be great if you could save up to X amount of custom fields and insert them with a click of a button instead of typing <img src="/images/flags/us.png"> on every post!

    Posted: 8 years ago #
  2. John Blackbourn
    WordPress Core Developer

    12345

    Good idea. You could probably hack something for your particular need from the Custom Field GUI plugin - try using the radio checkboxes option and something like this in your template:

    <img src="images/flags/<?php echo get_post_meta($post->ID, 'CountryFlag', true); ?>.png" />

    Posted: 8 years ago #
  3. With my Enzymes plugin, this is as simple a task as to write in your post {[1.us]}, assuming that in the post #1 you have a custom field called "us", whose content is '<img src="/images/flags/us.png">'. No need to add a custom field to the current post!

    Posted: 8 years ago #
  4. Jeff Chandler
    Member

    Pluggable

    Posted: 5 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    119 Votes
  • Status

    This is plugin territory