Page 1 of 1

Make sure you have all the basic files in your theme folder

Posted: Mon Dec 23, 2024 4:19 am
by Nihan089
Using the built-in blogroll functionality in WordPress, you can manually select a link to any post you want. This is probably the most flexible way, as you have the most control over how your links are displayed, and they don't even have to be on your site.

You can also categorize your links and list them all in separate lists, using just one line of code with the built-in wp_list_bookmarks function .

<?php wp_list_bookmarks('title_before=<h3>&title_after=</h3>&category_before=&category_after='); ?>
This will display all the categories in your blogroll list with “h3” headings. Depending on your sidebar markup, you may want to add code to display before and after each list.

If you want to exclude any category, you can use the parameter exclude_categorywith a comma-separated list of link category IDs.

Links to recent posts
This is a pretty simple thing that I've seen before . Using the same function wp_get_archiveswe've seen before, you can modify it to get a list of recent posts.

<?php wp_get_archives('title_li=&type=postbypost&limit=10'); ?>
This type=postbypostis the type to use. If you have a lot of messages, I would recommend using a limit so all of your messages are not displayed.

You can also use the “Recent Posts” widget, assuming your sidebar has widgets .

Conclusion
I know that on some sites, monthly archive links can be useful, like perhaps on a news site, or a “feature of the day” site (like for cartoons or recipes).

Some people check them just to see how long canada number code list the blog has been active, it can help credibility (hint: add the parameter show_post_count=1to show a post count next to the monthly archive links).

However, most of the time it is a waste of space. It can be replaced with other, much more useful links, such as popular content or related posts where users would find more value.

Any monthly archive links could be placed on a sitemap page and outside the sidebar.

I'd love to hear your thoughts in the comments. Do you use monthly archive links? When do you think they might be relevant? Do you have any other useful alternative examples?