WordPress.org

Support

Support » Plugins and Hacks » Display Widget on Home Page or Landing Page

Display Widget on Home Page or Landing Page

  • I can successfully display a widget on the home page with is_home function.
    I’m trying to display that same widget on either the home page or the first page a visitor lands on, and then not again, unless of course they go back to the home page.
    I think wp_get_original_referer might work, but I am having issues with the code.
    Can anyone help?

Viewing 1 replies (of 1 total)
  • FIXED:
    I used this in the widget logic plugin:
    is_home() or ! wp_get_referer(“Domain.com”)

    If a user comes from outside domain.com, they see widget OR if user lands on home page, they see the widget. All others, don’t.

Viewing 1 replies (of 1 total)
  • The topic ‘Display Widget on Home Page or Landing Page’ is closed to new replies.
Skip to toolbar