WordPress Template Help

I get quite a few people emailing or leaving comments asking for help with Templates and so on for WordPress, or issues with Blogsome that I’ve dealt with, but don’t appear in the forums.

Matt, Can you give a newbie some advice about installing the Connections theme? In the top nav menu there are five buttons: Home, About, Archives, Links, and Contacts. I can’t figure out how to make these links work. The Home button works ok, but not the others. My feeling is that I need to edit the links in header.php, but what do I put? Do I need to create pages first? If so, how do I do this? Also, can you tell me how to add a calendar like you have on your site? Thanks for all your help, Caitlin

It won’t matter if you have Pages created or not - and you can do this with Posts, or any URI. If you do have a Page or Pages created, you can then use the URI the Dashboard gives you in one of the later steps. To create a Page, use the ‘Write - Write Page’ menu in the Dashboard. Pages can not currently be created from ecto, or other off-line editing tools. Note that Pages use a different template file from posts, so if you are using Blogsome, you will have to hand code any markup in your Pages, they don’t just add the Page content into the {content} section. You will need to edit your Template to change the links at the top of the Connections Theme. If you are using Blogsome, or any WordPress Multi-User system, the changes will need to be made in the Main Page (index.html) template. Otherwise, under standard WordPress, the changes will indeed need to be in the header.php file. Either way, open the relevant file, and find the section that begins with <ul id="topnav"> There will be a series of list items (probably on seperate lines, although the Stylesheet will place them all on the same line). Each list item contains a URI, and the Link Text. Connections also has a seperator, of the Unix Pipe character: |. Each item you want in your navbar must appear, in the order you want them in your list of list items. Mine looks like the following: ` <li>Home </li> <li>About </li> <li>{wp_loginout} </li> <li> {wp_register} </li> <li> RSS </li> <li>Contact </li> ` Notice that mine has a whole heap of curly brackets - that’s because I use Blogsome, and they have Smarty Tags instead of raw PHP code. It’s taken me a while to get used to them, but they are kind of cool. If you are using standard WordPress, you’ll need to replace them with the proper PHP code - go to the WordPress Codex for examples of how they work. Basically, the curly braces need to be replaced by <?php and ?>; and the arguments are not named, are in parenthesis, and commands are followed by a semi-colon. For example, the first entry, Home should be: <li><a href="><?php bloginfo('url'); ?>" id="navHome" title="Posted Recently" accesskey="h">Home </a>|</li> Finally, the calendar is really easy to implement. PHP Code: <?php get_calendar(); ?> Smarty Code: {get_calendar} You can also alter your Stylesheet to modify the display styles of the calendar - look at the Source Code for your page to see what the classes are called. I also received the following question via email from Peter Valentino:

I just dunno who or where to turn to.. The blogsome forum doesnt help at all. I usually have long blog entry and want to cut it to the first small paragraphs view in the index page, and use that excerpt/more feature to read the rest. The trouble is i dunno how to do it. I have filled the excerpt box for every post and checked the view the excerpt option on the dashboard cpanel, but it still doesnt work. I’m thinking that prolly I delete the html tag for the feature in index.php, and if it’s true, I dunno where to find the original tag. This is also my problem: where can I go to easily get the original coding for each default templates provided by blogsome? Thanks for your help, Peter

This one’s easy - when posting using the Dashboard, locate the cursor where you want the break to be, and press the little more button from the Quicktags. Or, type in <!--more-->. If you are using ecto, typing into the first box will create text before the more seperator, the second box will be after. The trick here is that it’s not an excerpt or summary, but more of a teaser. I recall that it’s also possible to change the text that is displayed, but I’ll leave that as an exercise for the reader (hint: this may not work in Blogsome, IIRC). I’m more than happy to help with other issues, but be aware that I’ll post responses to my site, in preference to email, as this might help someone else out in the future.