Connect with us

Tips & Tricks

Build a classic MyBlogLog widget

Published

on

In this post I will show you how I created my custom widget showcasing mybloglog readers.

In your function.php file add this simple line of code:

<?php
// MyBlogLog
function MyBlogLogWidget()
{
?>
<script type="text/javascript" src="http://pub.mybloglog.com/comm2.php?mblID=ReplaceWithYourID&amp;c_width=220&amp;c_sn_opt=n&amp;c_rows=6&amp;c_img_size=h&amp;c_heading_text=&amp;c_color_heading_bg=e0e0d4&amp;c_color_heading=E8A02C&amp;c_color_link_bg=e0e0d4&amp;c_color_link=d54e21&amp;c&amp;c_color_bottom_bg=e0e0d4"></script>
<?php } 

//register the sidebar 'the widget name', 'the widget function'//
register_sidebar_widget('MyBlogLog Widget', 'MyBlogLogWidget');

?>

That’s it, just replace the “ReplaceWithYourID” with your mybloglog ID. You can also change the width at c_width=220 to what ever you like.

If you look closely at the code you may also see color codes, you may change them to corresponding hex codes, for example: c_color_bottom_bg=e0e0d4 is the color for the bottom background. e0e0d4 is a light gray, we can change it to ffffff and make it white.

That’s it, enjoy!

Continue Reading
4 Comments

4 Comments

  1. Danny

    February 5, 2009 at 9:04 am

    Hello, using your code, I obtain only an empty . have you got any idea?

    Danny´s last blog post..Proprieta’ Font-Weight: solo un browser la supporta

  2. frosty

    February 5, 2009 at 1:23 pm

    Hey Danny,
    Make sure this is pasted into your functions.php and then you should see a ‘widget’ in your widgets area..

  3. Glenn

    March 19, 2009 at 4:57 pm

    Austin,

    This disadvantage of placing widgets in the functions.php file is (I think) they get clobbered on an update of WordPress.

    Again you could use Widgetifyr.com to easily create a stand alone widget.

    Thanks
    Glenn

    • Austin

      March 19, 2009 at 7:49 pm

      Thanks Glenn,
      I will give your service a try with this widget.

You must be logged in to post a comment Login

Leave a Reply

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

Lil Uzi Vert Net Worth: Know Everything About Him.

Lil Uzi Vert Net Worth: Know Everything About Him.

Lil Uzi Vert Net Worth: Know Everything About Him. If you are into hardcore rapping, then you must have heard about Lil Uzi Vert. He is an American rapper and songwriter who rose to fame after his hit single ‘Bad and Boujee’ that ranked number 1 on the US Billboard Hot 100. Lil Uzi was […]

Russell Brunson net worth

Russell Brunson net worth

Russell Brunson net worth Introduction Russell is an autonomous businessman, a digital market pioneer, an author, mentor, and motivational speaker. Throughout his several years of career in numerous internet marketing services, he has earned a chance and has influenced millions. He has created the idea of selling in a software project named ClickFunnels through a […]

Nick Austin (Tik Tok) Height, Age, Wiki, Bio, Net Worth & More

Nick Austin (Tik Tok) Height, Age, Wiki, Bio, Net Worth & More

Nick Austin is an American social media star who is mainly popular on lip-syncing app Tik Tok. Within a short space of time, Austin has been able to gather a huge amount of fanbase on the platform. Austin was born on July 1, 2000, in the United States which makes him currently 19 years of […]

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 […]

Trending