WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] if(get_field()) not working (5 posts)

  1. macgamer
    Member
    Posted 1 year ago #

    using the code "if(get_field('fieldname'))" in my theme has stopped working. It was working until a recent update, and it works the first couple of times I call it, but after that, not at all.

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. macgamer
    Member
    Posted 1 year ago #

    update: I found the cause, not sure what the solution is though.
    the issue is that the plugin is assuming that the wp database is currently selected, but in my case, my theme actually makes calls to a different database. I guess I'll have to go through my code.

  3. macgamer
    Member
    Posted 1 year ago #

    resolved

  4. viktor89
    Member
    Posted 11 months ago #

    Would you mind sharing the solution? Having the same issue.

  5. viktor89? You may get a quicker response if you create your own topic with your own details. This thread is marked resolved and is 6 months old.

    http://wordpress.org/support/plugin/advanced-custom-fields#postform

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.