Skip to content

Instantly share code, notes, and snippets.

@merli129
Last active February 17, 2017 18:35
Show Gist options
  • Select an option

  • Save merli129/0f7f782269b34d87644e1d3784dd1d1d to your computer and use it in GitHub Desktop.

Select an option

Save merli129/0f7f782269b34d87644e1d3784dd1d1d to your computer and use it in GitHub Desktop.
Wordpress Notes
<!--Post Thumbnail Linking to the Post Permalink-->
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail(); ?>
</a>
<?php endif; ?>
<!--Post Thumbnail Link-->
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large' );
echo $large_image_url[0] <!--Link Itself-->
<!--Load scripts and styles-->
function theme_name_scripts(){
wp_enqueue_script('bootstrap.min', get_template_directory_uri() . '/js/bootstrap.min.js');
wp_enqueue_style('style', get_template_directory_uri() . '/css/style.css');
}
add_action('wp_enqueue_scripts', 'theme_name_scripts');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment