• jeffrydell

    (@jeffrydell)


    I’m trying to create my first WP plugin, but can’t determine the best place to integrate it in to WP. The plugin should display an alert box with a special headline and text at the top of the main content column ONLY when the site admin specifies.

    I call this a bulletin.

    The easiest example would be for a school website – it would be used to declare school closed for a day due to lack of power / lack of water / or severe weather. The site admin could enter a start date & time, an end date & time, Headline, and detail text (similar to a post).

    What action hook can I use to have my bulletin function invoked? The function itself would test to see if there is an ‘active’ bulletin and whether the site’s Home Page is being loaded. So calling the function doesn’t have to be page specific – it only needs to be ‘tested’ on each page load to see if there is a bulletin and if so, what to display.

    Thanks in advance for you help!

Viewing 1 replies (of 1 total)
  • Thread Starter jeffrydell

    (@jeffrydell)

    I may have been a little too focused on the wrong term in my first post. As I have read more, it appears that I might need to use a filter to call the plugin. Again, I’m still unclear on which filter I should be looking for, but it seems a filter might be more of what I’m looking for.

    I noticed in Contact Form 7 that one could simply embed a ‘call’ like this:
    [Contact Form 1]
    in the post and the contact form would appear in place of that code. This would be absolutely ideal – but what do I need in my plugin to make that sort of thing work?

    Thanks again for any help!

Viewing 1 replies (of 1 total)
  • The topic ‘First plugin / which action?’ is closed to new replies.