Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7692189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:47:43+00:00 2026-05-31T20:47:43+00:00

I have the following shortcode. What I would like to do is turn this

  • 0

I have the following shortcode. What I would like to do is turn this shortcode into a sidebar area so that I can run a decent contact widget. I have googled and tried a few tutorials but I cannot get it working.

Index.php

<?php
                $classes = '';
                if (strtolower($menuItem->title) == $precision_contact_page) {
            ?>
            <div id="<?php echo strtolower($menuItem->title); ?>scroller">
            <?php
                $page_data = get_page($menuItem->page_id);
                echo do_shortcode($page_data->post_content);
            ?>

Functions.php:

    //contactform shortcode
    function contactform_shortcode( $atts, $content = null ) {
        extract( shortcode_atts( array(
            'class' => 'content'
        ), $atts ) );

        $returncontent = '<div class="' . esc_attr($class) . '">';
        $returncontent .= '<a href="#" id="info" class="open">ContactInformation</a>
                <h5>Get In Touch</h5><div id="contactform">
                <div id="response"></div>
                <form id="precision-contact-form" method="POST" action="" class="form">
                    <div id="main">
                        <p class="name">
                            <input type="text" name="uname" id="uname" />
                            <label for="uname" class="overlabel">Name</label>
                        </p>
                        <p class="email">
                            <input type="text" name="uemail" id="uemail" />
                            <label for="uemail" class="overlabel">E-mail</label>
                        </p>
                        <p class="text">
                            <textarea name="ucomments" id="ucomments" ></textarea>
                        </p>
                        <p class="submit">
                            <button type="submit" name="submit" id="submit" class="graybutton">Send Email</button>
                        </p>
                    </div><!--end main-->
                </form>
            </div><!--end contact form-->';
        $returncontent .= '</div>';
        return $returncontent;
    }
    add_shortcode('contactform', 'contactform_shortcode');
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:47:45+00:00Added an answer on May 31, 2026 at 8:47 pm

    Past this where you want in side bar

     <?php echo do_shortcode('[contactform']'); ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following text in a page. As you can see my shortcode
I have in a sidebar: <div id=yyy> [shortcode]</div> It outputs a title that when
I have the following query select count(trade_sid), shortcode from trade where trade.trade_date <= sysdate
I have following example string that needs to be filtered 0173556677 (Alice), 017545454 (Bob)
I have following url: http://localhost.com/phpdemo/bid/tf/red ? This url redirects through This [ $route['tf/red?'] =
I have following situation: I have loged user, standard authentication with DB table $authAdapter
I have following string String str = replace :) :) with some other string;
I have following foreach-loop: using System.IO; //... if (Directory.Exists(path)) { foreach(string strFile in Directory.GetFiles(path,
I have following situation. A main table and many other tables linked together with
I have following table structure: Table: Plant PlantID: Primary Key PlantName: String Table: Party

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.