Support

Account

Home Forums Backend Issues (wp-admin) Strange Media Library Behavior with Custom WYSIWYG Field

Solved

Strange Media Library Behavior with Custom WYSIWYG Field

  • Hi there,

    I’ve come across some unexpected behavior with a custom field I’ve set up in my WordPress installation.

    I have two page templates that include a call to my ACF WYSIWYG field, and rules set up in the field creation screen to only show it when one of those two page templates is set as the template of record for a given page.

    And, so far so good, it does exactly that. I’m pleased.

    It is confusing to me that my custom field also appears in the media library. You can see a screenshot here. I certainly don’t need or want this field to show in this location.

    Any ideas how I can go about making it not show here?

    Thanks!

  • What version of ACF are you using?

    What are the location rules for your field group?

  • Hi John,

    I’m using ACF version 4.4.3.

    My location rules are pretty simple. I’ve got a two-part rule that states that the custom field should only be shown if the Page Template is equal to one of two page templates I’ve created. Everything else on the creation screen is pretty standard, and you can see it all in a screenshot here.

    Thanks for your help.

  • I’ve tried the setup you describe.

    The thing is that this field group should not be showing up anywhere because the page template cannot be both templates. Your locations rules should be OR rather than AND.

    So the next question is, do you have any other field groups that include a WYSIWYG editor?

    If not, what other plugins or acf add ons do you have installed on the site? Does the problem go away if you deactivate them?

  • Hi John,

    Thanks for the reminder on my ruleset. I think I set it that way trying to figure out this issue on my own and just never set it back.

    As far as your other questions go, for ACF I’m running nothing but the base free version to set up a proof-of-concept site. No add-ons at all; and these two page templates are all that reference the custom field.

    For my plugins, I’m using a fairly basic (I imagine) setup:

    Advanced Custom Fields v4.4.3
    Autoptimize v1.9.4
    BJ Lazy Load v1.0.6
    Breadcrumb NavXT v5.3.0
    HTML Page Sitemap v1.2
    RICG Responsive Images v3.0.0
    TinyMCE Advanced v4.2.5
    User Role Editor v4.20.1
    Wordfence Security v6.0.20
    Yoast SEO v2.3.5

    No combination of turning these off seems to affect the issue.

  • Update:

    I don’t know why, since it didn’t seem to matter last time, but changing the ruleset for which templates are associated with the custom field (changing from AND to OR) seems to have removed the custom field from being associated with the media library.

    The question, I guess, is why.

  • I don’t know the answer to that. I can’t get it to happen even if I set up a field with two templates the way you had it set up. But, it seems your problem is corrected.

  • Appears so. I’m gonna mark this solved, and, again, thanks for all your help.

Viewing 8 posts - 1 through 8 (of 8 total)

The topic ‘Strange Media Library Behavior with Custom WYSIWYG Field’ is closed to new replies.