Connect with us

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
7 Comments

7 Comments

  1. Septian

    March 28, 2009 at 6:16 am

    Nice hack Frosty, it works… 😀 btw, what’s the purpose of this new meta box?
    As far as I know, image function meta box already added (Thumbnail and Medium) right?

    Septian´s last blog post..iPhone 3G now available on Indonesia: Good or Bad News?

    • Austin

      March 28, 2009 at 2:12 pm

      I use it to generate dynamic resized images with a image php file I’ve got. Think if you need to add a simple meta box to add to custom fields.

  2. Miccky

    April 8, 2009 at 4:15 pm

    Hi!
    I like this theme.But I don’t know how to use it ,can you give me some help?
    micckysun@gmail.com
    I am from China , English is not so good !

    • Austin

      April 10, 2009 at 11:53 am

      Please feel free to use my contact form for some more help.
      Alternatvily you can contact me at austin [at] frostywebdesigns.com and I can contract some work for you.
      🙂

  3. Searcher

    May 21, 2009 at 12:55 am

    Hi Austin. I find this code very usefull for me. Can ask you in future to create something for me especially and for my need. It will be paid of course.

    • Austin

      May 21, 2009 at 7:45 am

      Absolutely, feel free to send me and email through the contact form, or through my portfolio site.

  4. shawn

    October 22, 2009 at 7:02 pm

    Using Hybrid on a site, and fairly a newbie overall at WP, but having a helluva time locating wp_list_pages to modify the header.

    Can you tell me where its located?
    .-= shawn´s last blog ..My new site! =-.

You must be logged in to post a comment Login

Leave a Reply

News

Working on a new theme called WordCult

Published

on

So I have been really busy, and haven’t been able to put up a new post since I got back from WordCamp Denver.

WordCult Screenshot

WordCult Screenshot

Working on some clients site’s and also a WordPress theme!

I have finished about 80% of the theme which is based off my current theme located on my personal blog site: TheFrosty. TheFrosty is using version 0.1 of the theme, which has many faults and bugs. I have fixed many of them, and probably added a few others.

In version 0.2 I’ve added a new jQuery “featured posts” loader and the option for sticky posts. I have also fixed a lot of CSS errors, it should W3C comply :).

Also in the newer version I have tried to add more to the admin panel, in ways of options.

If you would like to download this theme and test it out before I release it to the community please let me know. I would love to get some feedback or ideas on what you’ve got to say. Just use the contact form or send me a message on Twitter.

Download it:

[download#2#format=1]
[download#1#format=1]
Download Version 0.3

Once you’ve got the theme..

Let me know what you think! Leave you comments and feedback. I am also trying to get a forum up on the site as well.
Thanks!
Frosty

Update for 0.2:

I’ve updated my personal site: TheFrosty to the latest version of WordCult (0.2). I’ve already found some small bugs and CSS fixes that need to be taken care of. Also I don’t think that the Adsense display is working correctly.
If you’ve noticed any issues please contact me or leave a comment.

 

Update for 0.2.1:

The new version, 0.2.1 brings in some integration from Justin Tadlocks Widgets Reloaded plugin. It’s fully integrated into the theme. So you’ll notice some widgets disappear and be replaced by others. If you need to get them back Justin makes a plugin that will “release” the old widgets on your new theme install.

 

Update: 0.3

Get the newest version of WordCult, download Version 0.3 from this page.

Continue Reading

Themes

Fixing plugins not compatible with hybrid 0.4.2

Published

on

Hey everyone, as you may have noticed I have a running on the site. While everything almost everything moved over smoothly, there was an issue with how my parent theme striped text in typography. This caused some plugins, like cformsII to not be allowed to print to the screen. Justin had helped to find a fix to filter the hybrid_typography function.

Originally this function filtered out and changed some text that would not validate as XHTML. This had to be removed by running a new function in the child theme’s function.php file.

add_action('init', 'remove_typography');

function remove_typography() {
	remove_filter('the_content', 'hybrid_typography', 11);
}
Continue Reading

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

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

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

Bernie Sanders net worth 2020.

Bernie Sanders net worth 2020.

Bernie Sanders net worth Introduction Bernie Sanders is an American politician who, since 2007, has been a junior U.S. senator from Vermont and U.S. One of the wealthiest guys to enter the potential presidential election of 2020 is Senator Bernie Sanders. Because of the intense emphasis of the political bourgeois on the role of ‘millionaires […]

Leah Messer Net Worth: How Rich is the Teem Mom Star Actually?

Leah Messer Net Worth: How Rich is the Teem Mom Star Actually?

Leah Messer is a television personality who is best known for being a part of the cast of the hit reality television show called Teen Mom 2. As of 2019, Leah Messer net worth is estimated to be $80,000. Messer grew up as a country girl from a small town called Elkview, West Virginia. She […]

Trending