Forums

[resolved] Adding contact form to sidebar (using contact form v7) (8 posts)

  1. tjobbe
    Member
    Posted 3 years ago #

    The plugin I am using to create contact forms has given me a code to insert into my posts:

    [contact-form 4 "Subscribe to mailing list"]

    Is there anyway I can get this code to work in my sidebar?

    Do I need to put it within a loop or something?

  2. figaro
    Member
    Posted 3 years ago #

    Put it in a text widget.

  3. tjobbe
    Member
    Posted 3 years ago #

    Thanks Figaro - I haven't done this before, how would I do this?

  4. tjobbe
    Member
    Posted 3 years ago #

    This is my sidebar:

    <div id="column">
    			<h2>Categories;</h2>
    			<ul id="blogMenu">
    				<li><a href="/blog/">Blog home page</a></li>
    				<?php wp_list_categories('title_li=' ); ?>
    				<li>&nbsp;</li>
    				<li><h2>Subscribe;</h2></li>
    				<li><a href="http://www.miltonbayer.com/newsletter.php">Subscribe to our newsletter</a></li>
    				<li><a href="/blog/feed/rss/">Subscribe to the RSS feed</a></li>
    			</ul>
    			<!--div id="search">
    				<?php //get_search_form(); ?>
    			</div-->
    			<div id="twitter_div">
    				<h2 class="sidebar-title">Twitter Updates</h2>
    				<ul id="twitter_update_list"></ul>
    				<a href="http://twitter.com/miltonbayer" id="twitter-link" style="display:block; text-align:right;">follow us on Twitter</a>
    			</div>
    		</div>
  5. figaro
    Member
    Posted 3 years ago #

    In your WP admin just go to Appearance/Widgets and add a text widget...paste that code from contact form 7 into the widget and save.

    Note: When you add one widget all the default sidebar items will get removed, so you'll need to add the ones you want to use back as widgets.

    EDIT: Don't do anything in the code...login to WP and do the above in your admin area.

  6. tjobbe
    Member
    Posted 3 years ago #

    Thanks figaro, I did as you said - and it wont display.

    I have made quite a few modifications and created this template from scratch so how would I tell the sidebar to include widgets as I don't see anywhere where this is? (see code above)

  7. figaro
    Member
    Posted 3 years ago #

    Switch to the default theme that comes with WordPress (Kubrick) and see if it works there. If so, I would guess that your custom theme is not coded to work with widgets. If that's the case, you'll need to do a little research on how to make your theme widget enabled.

  8. tjobbe
    Member
    Posted 3 years ago #

    Thanks Figaro ;o)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.