• I have the PSX Mail Form plugin, and I made a page called “Contact” and added the form. But I want it to have a sidebar like my other pages. I tried editing the plugin file with the command to add the sidebar, but it just gives me the sidebar atop the page without styling. How do I add it?

    Oh, btw, im using Blix theme.

Viewing 7 replies - 1 through 7 (of 7 total)
  • You cannot add the sidebar via the plugin. Do it in a template for the Page – see there for instructions on creating a template file for Pages. The template will include the sidebar as part of the process.

    Thread Starter joshob

    (@joshob)

    Which file do I have to edit to add the sidebar? I looked and still do not understand this!

    Thread Starter joshob

    (@joshob)

    Got it, there was a thing I had to fix in the headr.php file, Blix theme workaround. Anyways… now I get the sidebar area, but no sidebar persay. Like, here ->

    https://www.fyrkuna.com/joshaube/wordpress/index.php/contact/

    any idea why the actual sidebar isnt showing up?

    You have to edit the Blix/contact.php file. Open it up and add this code at the bottom, right before the get footer code.

    <?php get_sidebar(); ?>

    You might have to rework the layout.css file to accomodate the sidebar on the page though.

    Yes, in your sidebar.php file, you have to add this code. Add it to the area where similar codes like this are located.

    <?php if (is_page("contact")) { ?>
    <?php } ?>

    Then, between these two lines of code, you have to tell it what content you want displayed in the sidebar. For example, if you want the categories displayed in the contact sidebar, you’d add;

    <h2><em>Categories</em></h2>
    <ul class="categories">
    <?php wp_list_cats('sort_column=name&hide_empty=0'); ?>
    </ul>

    Look through the different layouts in the sidebar.php file to see how you can add different items to it.

    Another solution, if you want your contact sidebar to be identical to your main page sidebar is to change this line of code, located near the top of the sidebar.php file.

    <?php if (is_home()) { ?>

    Change it to;

    <?php if (is_home() || is_page("contact")) { ?>

    Thread Starter joshob

    (@joshob)

    Ah! Thank you very much, it works perfectly ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding sidebar to Contact Form’ is closed to new replies.