Support

Account

Home Forums Add-ons Options Page Add a post-state indicator based on post object field on option page

Solved

Add a post-state indicator based on post object field on option page

  • This is kind of a frivolous idea, but I’m wondering whether anyone has already figured this out or can help me figure out how to add post-state text (see image)

    post-state text applied on home page

    to the page set in a post object field on an options page.

    I found this stackexchange thread discussing adding a custom post state, but I’m not quite comfortable enough with PHP to get the rest of the way myself!

  • The answer that shows how WC does it shows the code pretty well. The only difference is that you would substituted wc_get_page_id( 'shop' ) for get_field('your-field-name', 'options', false)

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

You must be logged in to reply to this topic.