logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > CMS (wordpress,Drupal,joomla etc)
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 11-14-2011, 07:53 PM   #1
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default Wordpress theme edited sidebar giving problems

Hi all (again)

I'm editing the sidebar on a wordpress theme, and I've added some graphics to appear under the widgety bits. For the life of me I cannot get them to appear. I have tried just dropping them into the existing widget div, and tried making my own style for a div (based on the existing widget div) but the little buggers just wont show up.

any ideas?

Code:
<div id="sidebar">
<div id="sidebar-top"></div>

<div id="sidebar-content">

            <div id="subcolumn">
                <div id="search">
                     <form id="searchform" method="get" action="<?php bloginfo('home'); ?>/">
                        <div>
                            <input type="text" name="s" id="s" value="" size="35" class="form-input" />
                            <input name="search" type="submit" value="Search" class="search-submit" />
                        </div>
                    </form>    
          </div>

    <?php if (function_exists('dynamic_sidebar')  && 0 && dynamic_sidebar(1) ) : else : ?>
    <div class="widget">            
<h2 class="hl">Categories</h2>
                <ul>
                        <?php wp_list_cats('sort_column=name&optioncount=1'); ?>
                </ul>
        </div>
    <?php endif; ?>
    
    </div>
    
    <div class="rightsidelogo">            
    <img src="images/city_and_guilds_widget.jpg" width="252" height="70" />
    </div>
            
    <img src="images/elecsa_widget.jpg" width="252" height="70" />

            
    <img src="images/mcs_widget.jpg" width="252" height="70" />

            
    <img src="images/rea_widget.jpg" width="252" height="70" />


</div>
<div id="sidebar-bottom"></div>

</div>
http://www.icelectricalservices.co.uk/site/

thanks in advance

Darren
monkeymedia is offline   Reply With Quote
Old 11-14-2011, 08:16 PM   #2
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

sorry problem sorted. I fixed it by adding in the full url's for the image names. no idea why the relative links didnt work though
monkeymedia is offline   Reply With Quote
Old 11-14-2011, 08:39 PM   #3
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Image links are relative to the file they are called from. In WordPress that file is buried somewhere in the WP folder structure. So you should use full URL or make your links relative to the site root:

Code:
/images/city_and_guilds_widget.jpg
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 11-14-2011, 11:00 PM   #4
d a v e
 
Join Date: Feb 2006
Location: finland
Posts: 1,684
Default

btw using all caps for body copy is not at all advisable! it's harder to read and can be difficult particularly for those with dyslexia. ditto fully justified text.
d a v e is offline   Reply With Quote
Old 11-15-2011, 03:56 PM   #5
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

cheers, so I was missing the leading / then?

yeah I'm not digging the caps either, its an existing theme I'm chopping about, the css file is goingt o get tinkered with soon
monkeymedia is offline   Reply With Quote
Old 11-15-2011, 03:58 PM   #6
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

Quote:
Originally Posted by monkeymedia View Post
cheers, so I was missing the leading / then?
If the images folder is in your root directory.
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 11-15-2011, 04:07 PM   #7
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

http://www.icelectricalservices.co.u...lds_widget.jpg

thats the full path that works, the actual php file thats being displayed is inside ic_theme (I think) but I don't understand how wordpress works anywhere near as well as I'd like to.
monkeymedia is offline   Reply With Quote
Old 11-15-2011, 06:00 PM   #8
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

WordPress has a built in Template Directory function that returns the absolute template directory path.

Code:
<?php get_template_directory(); ?>
Info is at http://codex.wordpress.org/Function_...late_directory

And don't worry, few of us understand WordPress as well as we'd like to. Except maybe for the guy who created this graphic: http://www.chipbennett.net/themes/te...ierarchy-rev3/
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Old 11-16-2011, 06:55 PM   #9
monkeymedia
monkeymedia's Avatar
 
Join Date: Jan 2010
Posts: 152
Default

cheers again. I really need to ditch th day job so I can concentrate on learning all this stuff. It's very frustrating.

anyway, we (I) have another problem and I'm kicking myself for it.

I basically grabbed a free template that had all the right bits in the right places, then replaced the graphics and tweaked the css to suit my needs (is that what people generally do?)

What I didnt check however is how it treats pages that have a parent page. The std 2011 theme drops them down, the one I have is horrible borked and just lists them under the parent page like this

http://www.icelectricalservices.co.uk/site/

and you can't even click them.

I discovered this last night late and decided I could probably fix it by arsing about with the css file. turns out I was wrong. Then I decided I was capable of ripping the menu bits out of the 2011 theme and splicing it into mine. wrong again.

I'm at a bit of a loss what to do now. I really dont want to start from scratch because I've done all the work replacing the graphics and all that

any ideas? thanks in advance.

monkeymedia is offline   Reply With Quote
Old 11-16-2011, 10:38 PM   #10
DWcourse
DWcourse's Avatar
 
Join Date: Apr 2009
Posts: 3,276
Default

I don't know your theme but the drop down menus have to be built-in. In theory you could move the parts from 2011 but you'd have to get it all which might be tricky to track down.

There are plugins to provide drop downs: http://wordpress.org/search/dropdown+menu
__________________
If my answer helped, check out DWcourse.com for Dreamweaver tips and tutorials.
DWcourse is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:00 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com