PDA

View Full Version : Wordpress theme edited sidebar giving problems


monkeymedia
11-14-2011, 06:53 PM
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?

<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
11-14-2011, 07:16 PM
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

DWcourse
11-14-2011, 07:39 PM
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:

/images/city_and_guilds_widget.jpg

d a v e
11-14-2011, 10:00 PM
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.

monkeymedia
11-15-2011, 02:56 PM
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

DWcourse
11-15-2011, 02:58 PM
cheers, so I was missing the leading / then?
If the images folder is in your root directory.

monkeymedia
11-15-2011, 03:07 PM
http://www.icelectricalservices.co.uk/site/wp-content/themes/ic_theme/images/city_and_guilds_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.

DWcourse
11-15-2011, 05:00 PM
WordPress has a built in Template Directory function that returns the absolute template directory path.

<?php get_template_directory(); ?>

Info is at http://codex.wordpress.org/Function_Reference/get_template_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/template-hierarchy/wordpresstemplatehierarchy-rev3/

monkeymedia
11-16-2011, 05:55 PM
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.

DWcourse
11-16-2011, 09:38 PM
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

monkeymedia
11-17-2011, 06:04 PM
oh balls, I'm really in the shit on this one. tried a few menu widgets, which were either just plain old shit or went horrible tits up by (guessing here) css conflicts because it was looking a bit like the old menu..

time for wine and thinking.

toying with the idea of doing something with the 2011 stock theme but editing it looks a bit of a bugger cos its so complicated.

monkeymedia
11-17-2011, 06:05 PM
sorry forgot to thank you for your time looking at this for me