Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author adiant

    (@adiant)

    My apologies for the delay in responding. It might just be the way my ID is setup, but I do not get notified of the first Support question asked about each plugin. After that, everything works fine.

    Let me look at Custom Fields right away, and see how easily I can add them to the plugin. I’ll report back here as soon as I have an answer.

    Thanks.

    Plugin Author adiant

    (@adiant)

    This may take a day or two to figure out the best way to handle this.

    I will report my progress here, in this thread.

    Thread Starter pezomatic

    (@pezomatic)

    Hi jonradio, thanks so much for looking into this for me.

    Plugin Author adiant

    (@adiant)

    For a number of reasons, especially Testing, it would be very valuable to understand how you are using Custom Fields. Here are some questions that would help me:

    1. Are you referring to a Post’s or Page’s Custom Fields? Some people refer to the Site Title as a Custom Field. And others refer to Attachment metadata as Custom fields.
    2. How are you accessing the Custom Fields? For example, using a Shortcode, directly coding PHP in a Theme, or through some built-in mechanism in a Theme or Plugin?
    3. Are you just looking to have the Shortcode you place in a Custom Field “expanded” only when it is retrieved from the WordPress database? Or do you need it expanded within the WordPress database? For example, if a Query is generated to search for a value of a Custom Field, that might require different handling by my plugin than if you were simply displaying a Custom Field value on a Page or Post.

    I’m out of the office for the rest of the day today, but I’ll be back this evening, and will be working on this tomorrow morning. I have found what appears to be the right Filter to do this for Page and Post Custom Fields being displayed and compared, but perhaps not Queried. Next step is to be sure it works the way you want to use Custom Fields, and how I suspect others might.

    Plugin Author adiant

    (@adiant)

    This one has been more difficult than the previous Filters I worked with for this plugin. My proof of concept prototype seems to work properly for Custom Fields in Posts and Pages, but the Filter I’m using is only in the get_metadata() and metadata_exists() functions, not in the get_metadata_by_mid() function, which has no Filter at all!

    Next step is to “code it properly” for Version 1.2 of the plugin.

    Thread Starter pezomatic

    (@pezomatic)

    Sorry for the delay in responding. Our web hosting company has been down for the past 24 hours. Argh!

    It would be great if your plugin supported custom fields but don’t drive yourself crazy trying to make this work. I was originally trying to insert a shortcode into a custom field so I could display a dynamic slider on a post using the a plugin called Live Composer

    The publisher of the plugin made a modification that allowed the shortcode to work how I needed (basically, a shortcode in shortcode).

    I am creating my custom fields with the plugin Advanced Custom Fields.

    I also found this add-on for ACF that may have done the trick: https://www.ads-software.com/plugins/advanced-custom-fields-shortcode-field/

    Thread Starter pezomatic

    (@pezomatic)

    Sorry, I just saw your most recent post. Thanks for working on this. Looking forward to trying your 1.2 update.

    Plugin Author adiant

    (@adiant)

    Just some wording changes on the Admin Setting page for the plugin, then full scale testing and I’m ready to release the Production version.

    Thanks for the info. That will help.

    Plugin Author adiant

    (@adiant)

    Version 1.2 has been released. It handles Shortcodes in Custom Fields defined for Pages and Posts. It was also tested with the Advanced Custom Fields plugin and worked as it should.

    Because of the fact that I used the only available Filter, which was designed for blocking Custom Fields, not changing them, there may be issues. For example, getting (directly or indirectly) a Custom Fields using either the wp_cache_get() or get_metadata_by_mid() function does not use the get_post_metadata Filter, which this plugin relies upon.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can you please explain how to add a custom field?’ is closed to new replies.