Wordpress Snippets

//Permalink <?php the_permalink(); ?> //Title <?php echo get_the_title(); ?> //The Home URL <?php echo home_url(); ?> //Get Post Meta <?php echo ( do_shortcode( get_post_meta( $post->ID , 'postmetaname' , true ) ) ); ?> //Template Directory <?php echo get_template_directory_uri(); ?> //The Post Thumb as IMG <?php the_post_thumbnail(); ?> //The Post Thumb as URL <? if ( has_post_thumbnail() ) { $thumb_id = get_post_thumbnail_id();$thumb_url_array = wp_get_attachment_image_src($thumb_id, 'full', true); $thumb_url = $thumb_url_array[0]; echo $thumb_url_array[0]; ?>

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.