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 7 of 7
  1. #1
    Senior Member Sean Thompson's Avatar
    Join Date
    May 2012
    Posts
    106
    Member #
    31720
    I'm looking to get into editing wordpress themes. One thing I recently did on my own site was create a "custom sidebar". I did this by putting a "Text" box in a sidebar widget and typing my HTML/inserting images into that. Is this the proper way to go about creating a sidebar in Wordpress?

    Thanks
    Kyle

  2.  

  3. #2
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,724
    Member #
    5580
    Liked
    718 times
    Sure, that's OK. If it's something that has to be changed frequently, or by persons that don't know HTML, then you'll need to try something different. I think when you said "putting in a text box", you meant the widget editor where you can slide the text widget, or any of the other widgets to the sidebar editor? One thing you should know, and you can try this yourself ... go to the widget manager or editor and find the text box that you put there. Put your mouse on it and drag it back to the other widgets (essentially removing it from the sidebar). You'll notice that it moves out of the sidebar, and your "text" is gone. You can't recover it (that I know of). So keep a copy of the HTML that you're putting in there in case you accidently erase it. There is no "undo" button.

    Now if someone (other than yourself) that doesn't know HTML, or doesn't understand the widget concept, needs to change that sidebar, you'll have to do it differently. You'll have to actually modify the sidebar.php script to force a particular "page" or "post" into the sidebar location. The person making changes will then edit the "page" or "post", and their changes will show up in the sidebar.

    The bad thing about the WP editor is that what's showing in the editor (WYSIWYG) may not look the same on the actual website pages because that content will be adjusted to whatever CSS layout rules apply. That will be really apparent with the sidebar, because it is tall and narrow.


  4. #3
    Senior Member Sean Thompson's Avatar
    Join Date
    May 2012
    Posts
    106
    Member #
    31720
    Yeah thanks for the heads up about copying the text in there.

  5. #4
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    The best way to make a sidebar in WP is to put it in a child theme.

    I have one client whose site has 8 different sidebars, with the content different in each one, and corresponding to the main content of the page. For example, on the Home page there is no sidebar at all, on the Contact page there is a map, driving directions, etc, on the FAQ page there are two - the one with the map and also one with two image carousels.

    It required writing some new lines in the functions.php file, and a file for each of the sidebars as I created them, and saving them all (functions.php, sidebar1.php, sidebar2.php. sidebar3.php,etc.) to my child theme.

    I found the information I needed HERE and modified the code so that the number of sidebars was 8. Later I found this plugin - I haven't tried it but if you do I'd like to hear about it - it could have saved me from re-inventing the wheel!
    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!

  6. #5
    Senior Member Sean Thompson's Avatar
    Join Date
    May 2012
    Posts
    106
    Member #
    31720
    Here is the code used on my site http://www.stormkat.com . Anyone know how to make it better? the coding sucks I know but I didn't know what else to do. When you resize the browser you can see things get all out of wack.

    <!================IMAGES OF SIDEBAR====================!>

    <div id="newmasterdiv1">
    <div id="newimagecontainer">
    <img src="http://stormkat.com/wp-content/uploa...pedtricked.png">
    </div>

    <!=========Text Links======================!>

    <div id="textservicelink1">
    <a href="http://stormkat.com/articles-with-built-in-seo/"><center><strong style="font-size: 28px;line-height:33px;">College-Educated<br> Article Writing</strong></center></a>
    </div>

    <div id="textservicelink2">
    <a href="http://stormkat.com/links/"><center><strong style="font-size: 28px;line-height:33px;">Link Building</strong></center></a>
    </div>

    <div id="false">
    f
    </div>

    </div>

    CSS:

    #newmasterdiv1 {
    }

    #textservicelink1 {
    margin-top:-340px;
    }

    #textservicelink2 {
    margin-top: 120px;
    }

  7. #6
    WDF Staff mlseim's Avatar
    Join Date
    Apr 2004
    Location
    Cottage Grove, Minnesota
    Posts
    7,724
    Member #
    5580
    Liked
    718 times
    I can't get the stormkat site to load.


  8. #7
    Senior Member Sean Thompson's Avatar
    Join Date
    May 2012
    Posts
    106
    Member #
    31720
    Hmm idk its working now.


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 06:50 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com