Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times

    Need To Post Contact Form 7 Tag On All WordPress Posts

    I need to add the Contact Form 7 tag to all WordPress posts that are generated though a PHP template. Is there a way to accomplish this? I tried adding the tag to the PHP page template, but that didn't work.
    I'm an art director crossing paths between print and web design.
    http://www.ballardstudio.com

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,975
    Member #
    5580
    Liked
    760 times
    A couple of questions ...

    What is the name of your contact form?

    Do you want the form to appear after every post on pages where there are several posts?
    Or only appear on "single post" pages?

    On the PHP script that is probably called "page.php" (it depends on who authored your theme),
    you add this:

    the_content();
    echo do_shortcode( '[contact-form 1 "name of your form here"]' );

    I of course have no idea what your form is named.


    If it's on "single page" for each post, you'll have to add more ...

    if ( is_singular() ) {
    the_content(); // display content on posts/pages
    if ( is_single() ) {
    echo do_shortcode( '[contact-form 1 "name of your form here"]' );
    }
    }
    Last edited by mlseim; Apr 23rd, 2014 at 08:37 PM.


  4. #3
    Senior Member BallardStudio's Avatar
    Join Date
    Jul 2011
    Posts
    143
    Member #
    28552
    Liked
    6 times
    Quote Originally Posted by mlseim View Post
    A couple of questions ...

    What is the name of your contact form?

    Do you want the form to appear after every post on pages where there are several posts?
    Or only appear on "single post" pages?

    On the PHP script that is probably called "page.php" (it depends on who authored your theme),
    you add this:

    the_content();
    echo do_shortcode( '[contact-form 1 "name of your form here"]' );

    I of course have no idea what your form is named.


    If it's on "single page" for each post, you'll have to add more ...

    if ( is_singular() ) {
    the_content(); // display content on posts/pages
    if ( is_single() ) {
    echo do_shortcode( '[contact-form 1 "name of your form here"]' );
    }
    }
    The page will be updated by someone with no coding experience. The form only needs to appear at the bottom of each "new post" page. No other pages need the form. I was looking for a plugin, but couldn't find one.
    I'm an art director crossing paths between print and web design.
    http://www.ballardstudio.com

  5. #4
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,975
    Member #
    5580
    Liked
    760 times
    Show me the url to a page where it should appear.

    You'll only edit the php script once and the form will appear. The user won't have to edit anything.

    You need to start showing us actual web pages ... maybe i have no idea what your form is, or how it should appear. Tough to read your mind.


  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    If you can give us a URL, and what theme you are using, we'd be better able to help.

    That said, Contact Form 7 has a widget plugin, that you can put in the footer or in a sidebar of your site.

    If you are using a theme with customizeable footer widgets, this could work for you.

    If you hard-code it into the footer.php file, you may have to redo it every time you update WordPress.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:05 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com