Connect with us

Tips & Tricks

Adding a favicon to your site

Published

on

Looking to add a favicon to you site?

Inside your WordPress theme’s functions file (functions.php) add the following to inside your PHP code.

/**
 * FAVICON
 * @WPCult.com
 */
function my_favicon() { ?>
	<link rel="shortcut icon" href="<?php echo bloginfo("stylesheet_directory") ?>'/images/favicon.ico" />
<?php }

add_action('wp_head', 'my_favicon');

That’s it, just be sure to upload an icon image or a .gif/.png. Be sure to correct the target location id the file is located somewhere else.

Themes

Jon Asked: How to add thumbnails above post on the THiCK theme

Published

on

I was asked by a reader:

I’m using the THiCK theme for my new design blog. I noticed you were able to add thumbnail images above your blog posts on the home page. What would I need to do to enable this on my blog?

Well Jon, this can be done very simple, since the theme is already using the Tim Thumb script.

What you will need to do is find in your index.php file, the second loop. Which you can find on line 40.

<?php query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] ); ?>

<?php while (have_posts()) : the_post(); ?>	

	<div class="post">
		<h2><a title="Permanent Link to <?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
		<div class="post-meta"><?php the_time('j/m/y'); ?> <span>|</span> <?php comments_popup_link('0 Comments', '1 Comment', '% Comments'); ?></div>
		<?php the_excerpt(); ?>
	</div>

<?php endwhile; ?>

Now we are going to add in the code. At line 43 we are going to add:

<?php if (get_option('woo_resize')) { // Check if we should use the image resizer ?>
                    <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo bloginfo('template_url'); ?>/thumb.php?src=<?php echo get_post_meta($post->ID, "image", $single = true); ?>&amp;h=80&amp;w=280&amp;zc=1&amp;q=90" alt="<?php the_title(); ?>" /></a>
                <?php } else { ?>
                    <a title="Continue reading this entry..." href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php echo get_post_meta($post->ID, "image", $single = true); ?>" alt="<?php the_title(); ?>" /></a>
                <?php } ?>

That’s it, just make sure that in the THiCK options panel you choose the “resize” option, or the image might break the layout. Or you may change the this code: $post->ID, "image", to: $post->ID, "image_thumb", and use a separate image for the lower blog.

Continue Reading

Tips & Tricks

How to: Add any authors gravatar to their post

Published

on

This is an easy one, just add one line to your single.php file where you would like the Gravatar to show up.

<?php echo get_avatar( get_the_author_id(), $size = '96', $default = '<path_to_url>' ); ?>
Continue Reading

Tips & Tricks

How to: Show what a user is searching for in the title

Published

on

Want to show what any user was searching for?
It is simple, just add this line where your title would be.

<h1>Browsing search results for <strong>"<?php the_search_query() ?>"</strong>.</h1>

The important line is the_search_query()

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Summit1g Net Worth: How Rich is the Twitch Streamer Actually?

Summit1g Net Worth: How Rich is the Twitch Streamer Actually?

Jaryd Russell Lazar, who is better known by his online persona as Summit1g, is an American Twitch streamer. Formerly, he was a Counter-Strike: Global Offensive player who represented teams such as A51 and Team Mythic in different competitions. As of 2019, Summit1g net worth is estimated to be massive $8 million. Yet, later on, he […]

Chris Ramsey Net Worth: How Rich is the English Comedian?

Chris Ramsey Net Worth: How Rich is the English Comedian?

Chris Ramsey is an English comedian and actor. Ramsey is currently participating in the 17th series of Strictly Come Dancing. As of 2019, Chris Ramsey net worth is estimated to be $800,000. Ramsey was born on August 3, 1986, in South Shields, England. He started his career in comedy in 2007 by hosting an open-mic night […]

Lil Nas X Net Worth: 5 Interesting Facts You Should Know

Lil Nas X Net Worth: 5 Interesting Facts You Should Know

Lil Nas X is an emerging rapper, singer, and songwriter from Atlanta. He is known for his hit single ‘Old Town Road’ which peaked at No. 1 on the Billboard Hot 100 chart. Here are five interesting facts about Lil Nas X including his net worth, personal life, career and more. 1. Lil Nas X […]

Daequan Loco Net Worth: How Rich is the Streamer Actually?

Daequan Loco Net Worth: How Rich is the Streamer Actually?

Daequan Loco is an American Twitch streamer as well as a Youtuber. Through his expertise in playing the game Fortnite, Loco has been able to establish a large following on Twitch with him currently having over 3.7 million followers on the platform. Moreover, he also plays the games Battlefield V, Maplestory 2, Earthfall, Overwatch, Outlast, […]

Trending