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

Add additional meta boxes to Hybrid Theme

Published

on

At the time of writing this post I have Theme Hybrid as my parent theme, and am using a custom version of Hybrid News that Justin Tadlock offers to the public.

Well I want to tell you how you can add additional custom meta boxes to your child theme’s running the Hybrid Theme.

In your child function.php file just add the following to create a new post meta box:

/**
* Add additional post meta boxes
*
* by WPCult
*/
function wpcult_post_meta_boxes($meta_boxes) {
	$meta_boxes['image'] = array(
		'name' => 'image',
		'default' => '',
		'title' => __('Image:'),
		'type' => 'text',
		'show_description' => false,
		'description' => __('Please use a full size image, larger than 500px (this photo will dynamically re-size itself!'),
	);
	return $meta_boxes;
}
add_filter('hybrid_post_meta_boxes', 'wpcult_post_meta_boxes');

This will create a custom meta box called Image, and will create a custom field with the id of image.

Additionally you can create this on pages as well by copy/paste and replacing “post_meta_box” with “page_meta_box” every where inside the function.

Continue Reading

Tips & Tricks

Sick of images being to large for the content area?

Published

on

Have you ever uploaded an image that might have been a tad bigger than the width of your content area? I know I have! So here is a little CSS fix to handle these situations.

Resize those large images using CSS

Resize those large images using CSS

.post img {
	max-width: 600px;
	height: auto;
	}

That’s it, really simple huh. Just make sure that you change the .post to the correct body class(which starts with a “.“) or body ID(which starts with a “#“).

Would you like a quick explanation?
The CSS is just telling any image inside the class of .post to not be more than 600px wide. By the way make sure you change it to fit the dimension of your content width. And the height attribute is set to auto to automatically change the height to match the new width. 🙂

Continue Reading

Tips & Tricks

How to: Display RSS feeds from anywhere

Published

on

Here is a simple way to display any RSS feed in your WordPress blog.

<?php include_once(ABSPATH . WPINC . '/rss.php');
	$rss = fetch_rss('http://feeds2.feedburner.com/WPCult');
	$items = array_slice($rss->items, 0, 4);

		if (empty($items)) echo '<li>No items</li>';
		else
			foreach ( $items as $item ) : ?>
            <a style="font-size: 14px;" href='<?php echo $item['link']; ?>' title='<?php echo $item['title']; ?>'><?php echo $item['title']; ?></a><br /> 
            <p style="font-size: 10px; color: #aaa;"><?php echo date('F, j Y',strtotime($item['pubdate'])); ?></p>
            <p><?php echo substr($item['summary'],0,strpos($item['summary'], "This is a post from")); ?></p>
            <?php endforeach; ?>

The first step is to include the WordPress file rss.php then will apply code after to style the feeds.

Of coarse I forgot to mention, change the RSS feed to the feed you want to pull.

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Alex French (Tik Tok) Wiki, Net Worth, Age, Height & More

Alex French (Tik Tok) Wiki, Net Worth, Age, Height & More

Alex French is an American social media star who has gained fame following her activities on Tik Tok where she uploads dancing and lip-sync videos. She had a rapid rise on Tik Tok after her followers’ count rose by over 800,000 in four days. Alex French was born on March 19, 2003, in Texas to […]

Devin Haney Net Worth: How Rich is the Boxer Actually?

Devin Haney Net Worth: How Rich is the Boxer Actually?

Devin Haney is an American professional boxer. He is the current WBC lightweight champion. Haney is ranked third-best active lightweight by The Ring magazine and fifth by the Transnational Boxing Rankings Board. As of 2019, Devin Haney net worth is estimated to be $1.5 million. Haney was born on November 17, 1998, in San Francisco, California. Devin’s father William Haney is also a […]

YNW Melly Net Worth: 5 Interesting Facts You Should Know

YNW Melly Net Worth: 5 Interesting Facts You Should Know

Jamell Maurice Demons, who is better known as YNW Melly, is an American rapper and songwriter from Gifford, Florida. Here are some facts about YNW Melly: 1. His mother conceived him when she was only 14 Melly was born on May 1, 1999. His mother was only 14 years of age and in ninth grade […]

Ceaser Emanuel Net Worth: How Rich is Black Ink Crew Star?

Ceaser Emanuel Net Worth: How Rich is Black Ink Crew Star?

David Emmanuel, who is better known as Ceaser Emmanuel, is the CEO of the tattoo shop franchise called Black Ink Crew. The show also has a reality television series of the same name on VH1 which has operated for a total of 8 seasons so far. As of 2019, Ceaser Emanuel net worth is estimated […]

Trending