Monday, October 24th, 2016
Use the PHP in the query below – and then the HTML example below to echo the URL out.
the_post_thumbnail_url(); // without parameter -> 'post-thumbnail'
the_post_thumbnail_url( 'thumbnail' ); // Thumbnail (default 150px x 150px max)
the_post_thumbnail_url( 'medium' ); // Medium resolution (default 300px x 300px max)
the_post_thumbnail_url( 'large' ); // Large resolution (default 640px x 640px max)
the_post_thumbnail_url( 'full' ); // Full resolution (original size uploaded)
the_post_thumbnail_url( array(100, 100) ); // Other resolutions
Tags: Echo, Query, Thumbnail, URL, WordPress
Posted in PHP, WordPress | No Comments »
Thursday, July 30th, 2015
<?php
$this_page = get_post($id);
$parent_id = $this_page->post_parent;
if ($parent_id) {
$parent = get_page($parent_id);
echo '';
}
?>
Tags: Link, Parent, URL, WordPress
Posted in PHP, WordPress | No Comments »