Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
adding thumbnails
// Custom Child Theme Functions
// First we make our function
function childtheme_welcome_blurb() {
if (is_home() & !is_paged()) { ?>
<div id="welcome-blurb">
<p>Red Pyramids is<br>
Tal Stadler's space for<br>
design and words /<br>
words and design<br>
Serach different angle></br> <?php bloginfo('name'); ?>.</p>
<?php }
function childtheme_posttitle($posttitle) {
return '<div class="containing">' . $posttitle . '</div>';
/* Homepage
function childtheme_hp_thumbs(){
//Supporting thumbnails in WP:
if ( function_exists( 'add_theme_support' ) ) {
add_theme_support( 'post-thumbnails' );
function childtheme_content($unfiltered) { //pass the original unfiltered content
if (is_home()){ // if this is the home page
<a href="<?php the_permalink(); ?>"><?php //call the link to the post
if ( has_post_thumbnail() ) { // if the post has a Post Thumbnail
the_post_thumbnail(array(100,100)); //use it in 100px maximum
} else {
the_title(); //use the title of the post
?></a><?php //close the link
} else { //if it's not the homepage
echo $unfiltered; //forget about it, use the original content
add_filter('the_content','childtheme_content'); //filter the_content with our function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.