Don’t know how you built your menu, but you could “hardcode” the links to the pages/posts you want in the main menu or, use wp_list_pages and redirect some pages to the posts/category list you want. For this reply, I opt to use the first method – hardcoding the links.
<ul id="navigation">
<li><a href="http://example.com/">Home</a></li>
<li><a href="http://example.com/category/portfolio">Portfolio</a></li>
<li><a href="http://example.com/themes">Themes</a></li>
<li><a href="http://example.com/contact-us/">Contact Us</a></li>
</ul>
Thanks,
I’ve had hardcoded links pages on my sites in the past, and after a while, they become a nightmare to maintain (sometimes I’ve had hundreds links). Isn’t there a way to use the “category” tag to filter what links will show up on a given page in the get_links_list? So I could then use a category like “Music Resources” to filter what would appear on the page, and then create sub-categories like “Theory” “Ear-Training” “Transcriptions” etc.?
<h2>Links:</h2>
<ul>
<?php get_links_list(); ?>
</ul>
Whoa, links_list is different. The following code might help you:
<ul>
<li><a href="<?php echo get_option('home'); ?>/">Home</a></li>
<?php wp_list_pages('include=7,13,35&title_li='); ?>
<?php wp_list_categories('include=3,9,1635&title_li='); ?>
</ul>
Replace numbers after include= with page ID numbers and category ID numbers you want in the memu.
Thanks, I’ll try that. I’ve got a lot going on here (maybe trying to fight the battle on too many fronts, but this is how I learn). Read “WordPress for Dummies” cover to cover this week. Digging into some CSS and PHP books next. My background was DOS and dBASE programming in the 80s and other than a little HTML since then, I’ve tried to stick to playing music (which is what I do for a living). But I’m trying to work on this site, and it’s difficult to find programmers, so finally I’m just rolling up my sleeves and diving in.
Since what I really want is to use WordPress as a CMS to build a website with some blog aspects, are there any good books you’d recommend?
The menu order lies in how you want to put your page order. For example, in Pages when you edit or make a new page, you can go to Attributes and in the field that asks for order, you can put where you want it.
So, if you have 7 main links in your parent pages, you will have to label your parent pages 1 or 2 or so on in the order you want it to appear. (1 = 1st)
jazzand: it all depends on what you want to concentrate on.
If you want to develop themes then WordPress for Dummies, WordPress Theme Design, and so forth. It’s also good to look at the theme files of other developers and learn from them.
If you’re interested in creating WordPress plugins, a great book to read is WordPress Plugin Development by Prelovac.
If you’re more interested about blogging and earning from your blog, there are a variety of WordPress books available at Amazon or any other store you prefer.
If interested in all three, welcome to the club π
Thanks,
Now I see the “Order” attribute down there (don’t know how I missed it, or why it didn’t come up when I tried searching on “page order”).
So I’m using the wp_list_pages tag to create a simple menu. Do I use the parameter sort_column? And whats the name of the value for the order field?
Thanks again for all the help.
Ah, I finally found the answer on this site and got it to work.
My site is still pretty raw. I’m really just trying to lay out the framework right now. But you can see it here http://www.jazzguitarlessons.com/lessons
It’s kind of working right now, but definitely not ready for public consumption as I keep working on it (you can interpret that as “breaking it” π
Again. Thanks for all the help.
Oh, and for the next person who has to deal w. this:
Here’s what went in the header.php
<div id="pagelist">
<div id="page-list">
<ul>
<?php wp_list_pages('sort_column=menu_order&depth=1&title_li='); ?>
</ul>
</div>
</div>
And this went in the CSS:
/* pagelist menu bar */
#pagelist {
padding:0px 0px 0 0px;
font-size:12px;
font-family: Georgia, 'Times New Roman', serif; font-weight: normal;
}
#pagelist ul li {
display:inline;
border-right:1px solid #FFFFFF;
margin:0 5px 0 0;
padding:0 5px 0 0;
}
#pagelist ul li a {
color:#999;
}
#pagelist ul li a:hover { background: #363430;
text-decoration:none;
color:#bd934f;
}
#pagelist ul li.current_page_item a {
color:#bd934f;
font-weight:bold;
}
/* pagelist menu bar */