linking pic previews to posts

Replace this line <?php the_post_thumbnail(); ?> with <?php echo ‘<a href=”‘ . get_permalink() . ‘”>’; the_post_thumbnail(); echo ‘</a>’; ?> You want to use get_permalink() to turn that image into a link.

How to find all links between pages

Post Search Approach Pull out all of your posts and pages from the database Iterate through all pages / posts and do a string search on the content – substr_count( ‘http://www.yourdomain.com’, $page->content ); Sum up the counts from all the posts / pages This will of course miss allot of links made by plugins, navigation … Read more

Use WP 3.1 Internal Linking ‘widget’ as a meta_box

WordPress 3.1 Internal Linking feature was coded as a TinyMCE editor plugin so its not really a widget or a meta box but you can code your own meta box and reuse the functiona needed for that. The files you need to look at are /wp-includes/js/tinymce/wp-mce-link.php /wp-includes/js/tinymce/plugins/wplink/js/wplink.js and maybe a few more but these are … Read more

Problem with guids and absolute links

1) The GUID is exactly that — a GUID. It’s used to uniquely identify the post. If you need to link to a post, then use get_permalink( $post_ID ) ($post_ID is optional) (link: get_permalink). 2) Not without a plugin, no. There’s talk of using an image shortcode for 3.1 though, or maybe 3.2. In the … Read more