Hi, Firstly let me say that I have only been playing with WordPress for the last week and have relatively no experience with HTML or PHP code. I have built a site using the visual editor in dreamweaver and so on, but anyways!
I installed the free shaken & Grid template which is brilliant, however there was a couple of things I want to change.
I worked out how to add the comments section to the site by reading this forum, but I want to add the side bar to the main page.
So I added this code to the main template
<?php get_sidebar(); ?>
</div><!– #page –>
</div><!– #wrap –>’
Which made the side bar appear but none of the links or widgets work.
I have spent ages trying to work this out so anyhelp would be really appreciated!
A link would help if that’s possible.
What do you mean the links don’t work? Do you mean they don’t act as links or that they’re pointing to the wrong URLs/Permalinks?
Also, if you mean this theme:
… then it’s a commercial theme so we won’t be able to download a copy to see what’s in it, making the chances that we can help you rather slim.
The theme’s vendors will more than likely provide support, though.
Thanks for the response.
Yes it is a version of the theme you showed but the free copy, so the vendor doesnt offer support…
Perhaps I have termed the issue incorrectly, the side bar appears on the “home” page once I included the code stated above, but none of the widgets work. So for example, I can see the catagories for posts I have listed and they appear in blue so it looks like I can link through to a particular post, however when I try to click them I get no response. Same with search bar and recent comments widget.
If you have a look at http://www.tauntonkickboxing.co.uk/Wordpress/
it may be clearer!
I have just put the code back in so you could have a look and now it appears to have added the side bar to front page but removed it from all my posts!!
Getting a tad confused here! Lol
The only reason I can’t click on them is because they are covered by the content so I can’t get to them.
The tag cloud shows and I can click on those and they work OK.
What browser are you using?
I am using firefox 7.0.1, will try in IE and see what happens then!
For me, the sidebar on the right is there for all the pages (and that’s the sidebar that
get_sidebar()pulls in). And all the links are fine. On the front page it’s inaccessible because it’s obscured by the content.
No! Whatever you do don’t try IE.
I’m using FF. So why aren’t you seeing what I’m seeing.
How odd PAE, I have just checked on IE and it shows the same as firefox! Is there a reason there is a difference between our browsers?
IE is the bane of all Web Developers. It’s buggy and non-standards compliant. Although versions from 8 upwards have been improving.
The trick is to get your pages working in Firefox using standards compliant HTML and CSS and then sort IE out if necessary.
Firefox also has lots of really, really useful add-ons like the Web Developer toolbar and FireBug, without which life as a Web Developer is much, much harder. IE has nothing even half as good.
Chrome’s OK too.
But back to your site. I just tested it in FF on Windows XP and have the same problem. Your content over-runs the sidebar on the home page. The sidebar is present in all other pages and works.
Yeah I have seen the add on’s on Firefox, been using Firebug to work out code and so on…but thanks for the info seems there’s alot I have to learn!
If I dont have my browser at full screen then I have the same problem yet when it’s full width then I can see it all, content included. I assume and forgive if I am wrong but it’s like the tool bar isnt “Dynamic”, (am I phrasing that right?) so it’s not altering depth when I alter the browser size, is there anyway around that of am I off the mark?
Thanks PAE you really have been a big help!!
I think the problem is that the element #wrap is at full width (even though you may not see that without FireBug when the browser window is maximised — you must have a massive monitor, by the way). So the links are always behind the #wrap element.
I notice you have your call to get_sidebar before the main content. It’s more usual to have it afterwards. Maybe that would help.
Sorry PAE but I have placed it a few different places and the side bar appears at the bottom!
This is the code
<?php get_header(); ?> <div class="wrap"> <div id="grid"> <?php /* Run the loop to output the posts. * If you want to overload this in a child theme then include a file * called loop-index.php and that will be used instead. */ get_template_part( 'loop', 'index' ); ?> </div><!-- #grid --> <wp_allow_comment> </div><!-- #wrap --> <?php get_footer(); ?>
Where would you put the sidebar code???
Hmm. That’s not what’s up on the Web at the moment. At the moment the #grid div is not inside #wrap, but is on the same level.
Working from your code, though, I’d use CSS to limit the width of the #wrap div and put the call to get_sidebar() immediately before get_footer(). The reason it goes onto a new line is because there’s no room for it next to #wrap. You have to make #wrap narrower to allow the sidebar room on the same level.
- The topic ‘Beginner Code Problem!’ is closed to new replies.