<?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> <div><img src="<?php echo $image; ?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" border="0" /></div> <?php endif; ?>
The URL’s of our posts in WordPress looks like: http://blogbysid.wordpress.com/2013/04/26/creating-google-oauth-api-keys-and-developer-key/
Using the_permalink() would generate the link but if you want to get the link only and don’t want it to get displayed, what should we do ?
A lot of of the WordPress function have ‘return’ alternates using get as the operative word.
get_the_permalink() - To get the link get_the_time() - To get the time get_the_content() - To get the content
To change WordPress from the standard single site install to a WordPress Multisite which allows you to create a network of sites you need to:
- Update your wp-config.php file.
- Choose the structure of your Multisite in terms of whether you want to use sub-domains or sub-directories.
- Add the extra lines your WordPress installation generates into your wp-config.php.
- Add the generated mod_rewrite rules to your .htaccess file, replacing other WordPress rules.
You do this as follows:
Updating your wp-config.php file
- Locate your wp-config.php file on your hard drive.
- Open your wp-config.php file for editing.
- Add the following line to your wp-config.php file:
above where it says /* That’s all, stop editing! Happy blogging. */: Continue reading