• Hi,

    i wish to include a form at the end of a specific category of posts without manually needing to edit each one. is this possible?

    i wish to include it at the end of the article above the comments and NOT at the footer.

    edit i could do this manually but this may lead to errors!

    • This topic was modified 3 years, 8 months ago by ntn888.
    • This topic was modified 3 years, 7 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Yes, that’s possible.

    You could edit the theme’s single.php template file and conditionally include the form after the_content, using the in_category() conditional tag, eg:

    <?php if ('in_category( 'mycategory') ) {
    
    // form code goes here 
    
    ?>

    You could also use a plugin like Ad Inserter to automatically insert the form (shortcode, custom HTML, PHP code, anything really — doesn’t have to be ads!) below the posts by ONLY posts from your chosen category.

    Good luck!

    Thread Starter ntn888

    (@ntn888)

    thanks for your response

    i ended up using dynamic conditions plugin with elementor pro to do this.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘standard form at end of post article’ is closed to new replies.