5457 readersWordPress provides several navigational template tags to make it easy for visitors to surf your pages. There are basically two different types of template tags used for chronological post navigation:
posts_nav_link() – for navigating various archive (non-single) pages
previous_post_link() & next_post_link() – for navigating single-post pages
These template tags output the HTML markup required to create the actual
8724 readers
( example screenshot )PHP
add_action("admin_init", "pdf_init");
add_action('save_post', 'save_pdf_link');
function pdf_init(){
add_meta_box("my-pdf", "PDF Document", "pdf_link", "post", "normal", "low");
}
function pdf_link(){
global $post;
$custom = get_post_custom($post->ID);
$link = $custom["link"][0];
$count = 0;
echo '';
$query_pdf_args = array(
'post_type' => 'attachment',
'post_mime_type' =>'application/pdf',
'post_status' => 'inherit',
'posts_per_page' => -1,
);
$query_pdf = new WP_Query( $query_pdf_args );
$pdf = array();
echo '';
echo 'SELECT pdf FILE';
foreach ( $query_pdf->posts as $file) {
5969 readersWordPress allows you to vary how many blog posts you show on your blog, but it's a single setting, and affects how many blog posts show over the whole website. This tip allows you to have a different number of posts for a particular category.Looking for WordPress hosting? Try WP Web Host. Prices starts at
3268 readersFinally! WordPress 3.0 was released last week. Among other exiting features, custom post types are bringing lots of new possibilities to bloggers. In this tutorial, I'll show you how to create a side blog listing products using the WordPress 3.0 custom post type feature.Like CatsWhoCode? If yes, don't hesitate to check my other blog CatsWhoBlog:
4158 readersAndrew Nacin:
Anything you create in the global namespace has the potential to conflict with a theme, another plugin (including one you wrote), and WordPress core itself. Thus, prefix everything with a unique-enough character set. For example, all functions I write always start with “nacin_”, and I make sure that my functions are unique across all
3564 readersWordPress have lots of useful built-in function, unfortunely there's no function to allow the quick edition of a term (category, tag, or custom term). Nevermind, we can still built our own.Looking for WordPress hosting? Try WP Web Host. Prices starts at $5/month and you can try it for free!WordPress tip: How to make term edition
4126 readersI had the occasion yesterday to have a page with a section on it where it would output a very specific set of other pages, which would need to change dynamically. What I could have done is built a special page template for this page, and inside that template run a query_posts() to get these
5601 readersIn WordPress, there are three ways to respond to a post: you can leave a comment, leave a trackback, or just link to the post to create a pingback. When displaying all of the responses to your posts, it’s a good idea to separate the comments from the pingbacks and trackbacks. Uninterrupted comment threads are
734 readersWordPress is primarily a blog platform. Not infrequently it is used as a CMS. But not just static pages play a role, but also posts, because they are giving more opportunities, having better performance and be published in feeds. Therefore, I prefer to use, in the context of WP as a CMS, posts more than
2820 readersWe covered how to run a shortcode in a widget. But what about inserting a widget with a shortcode? I recently had this situation come up. I had a single page where I just wanted to be able to chuck in a widget without the whole rigmarole of creating a special widgetized area and probably