Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1116727

    I added a mailchimp form after each post by following the instructions for “Add mailchimp to all page/post” here. But, the form also shows up on blog and archive pages after every post, how do I remove those? I couldn’t find any help using Google.

    #1117011

    Hey drewtarvin,

    Thank you for using Enfold.

    That feature or option is not available in the theme by default. Are you using a third party plugin for that? Maybe we can use css to hide the form when the current page is a blog or an archive page.

    Best regards,
    Ismael

    #1117092

    I just followed the instructions at the link I shared (instructions from Enfold) where I added code to my functions.php file. I don’t know enough about wordpress coding to have it only display when it’s on a single page and not all the time, and was hoping someone may know.

    #1117403

    Hi,

    Thank you for using Enfold.

    Did you add the mailchimp signup form as a widget? You can use the following plugin to set the visibility of the widget.

    // https://wordpress.org/plugins/widget-logic/

    Best regards,
    Ismael

    #1117490

    I did not. I was hoping there was just a simple change I could make in the if / case statement that would work instead of adding more plugins to my site. I’ll keep searching, thanks.

    #1117753

    Hi,

    My bad. I didn’t know that you’re using the the_content filter. Please look for this line:

     if( ! $post instanceof WP_Post ) return $content;
    

    And replace it with:

     if( ! $post instanceof WP_Post || is_archive() || is_home() ) return $content;
    

    That should prevent the subscribe form from rendering in the archive and blog pages.

    Best regards,
    Ismael

    #1117863

    That worked perfectly, exactly what I was looking for, thank you!

    #1117953

    Hi,

    Great, I’m glad that Ismael could help you out. Please let us know if you should need any further help on the topic or if we can close it.

    Best regards,
    Rikard

    #1118093

    Yes, please close!

    #1118247

    Hi,

    Thanks for letting us know, I’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Mailchimp Form after Post but NOT on Blog or Archive Pages?’ is closed to new replies.