Support » Developing with WordPress » Adding a form to a posts page

  • Hello,

    I am trying to add a newsletter sign-up form to a posts page. I have the short code and was hoping to add the form as a widget. However, right now I can’t figure out how to do that. Although I know I can’t edit a posts page, I thought it was possible to add widgets to the page (as a workaround).

    If not through widgets. How could I add a form to the posts page?

Viewing 3 replies - 1 through 3 (of 3 total)
  • You are asking two different things.
    shortcode versus widget
    widget on particular page

    If by “posts page” you mean one of the standard archive pages that list posts (index, taxonomy, date, search), then No, you can’t edit these pages since they are generated from what is in the URL.
    If your theme has a widget area, you can add widgets to it. That widget will be shown every time that widget area is shown. There are plugins like Dynamic Widgets that let you choose when to show the widget.

    Are you sure you have a shortcode? Or do you have HTML?
    A shortcode is specific to WP, and has to have a handler, so you would need a plugin to supply that, and it might provide a widget as well as a shortcode. (looks like [shortname])
    HTML would be more generic, and probably looks like <script src="..."></script>.
    You can use a Text widget or Custom HTML widget and put the shortcode in it. If it does not expand the shortcode, you can get a plugin to add that, but I think it does by default.

    Thread Starter mantonson


    Yes, by posts page I just meant a dynamic page that shows posts as they are published. For the shortcode I am using the Hubspot plugin to generate it for the form, but my main concern is finding a way to add the form to the page.

    Is there any way I could add the form to the “posts page”? I imagine there has to be some way of doing so. How would I add a widget area to the theme such that it shows up on the posts page?

    Thank you!

    I suggest you ask at the Hubspot plugin’s support forum for help with adding the shortcode.
    If your theme does not have a widget area on the list pages, you would need to make a child theme to add one or a call to the form output function.
    Or switch themes to one that has a widget area already.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.