• Resolved tjobbe

    (@tjobbe)


    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?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Put it in a text widget.

    Thread Starter tjobbe

    (@tjobbe)

    Thanks Figaro – I haven’t done this before, how would I do this?

    Thread Starter tjobbe

    (@tjobbe)

    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="https://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="https://twitter.com/miltonbayer" id="twitter-link" style="display:block; text-align:right;">follow us on Twitter</a>
    			</div>
    		</div>

    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.

    Thread Starter tjobbe

    (@tjobbe)

    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)

    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.

    Thread Starter tjobbe

    (@tjobbe)

    Thanks Figaro ;o)

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding contact form to sidebar (using contact form v7)’ is closed to new replies.