2182 posts
    Has referred 200+ members Has sold $500,000+ on Envato Market Has collected 50+ items on Envato Market Elite Author: Sold more than $75,000 on Envato Market
+14 more
mpc Volunteer moderator says

Hi guys, most of you here are much more experienced in developing WordPress themes thats why I have another questions for you. I am developing some themes and would like them to share some additional widgets like: popular posts, twitter, ect. WordPress.org hosts some great plugins that can do that, my question is do you use plugins and just skin them or write the whole thing by yourself (which seams a little silly because it is already done…). If you are using plugins how do you integrate them into theme, do they automatically install along with a Theme or what is your solution?

1 post
    Has been part of the Envato Community for over 2 years
red-5 says

I would also like to know the answer to this :)

2566 posts Put a Donk On It
    Has referred 200+ members Has sold $250,000+ on Envato Market Has collected 10+ items on Envato Market Elite Author: Sold more than $75,000 on Envato Market
+10 more
ThemeProvince says

Hi guys,

I create custom widgets from scratch as it is easier in the long run.

Here is a standard custom wordpress widget. Simply place it in your functions.php or anywhere in the plugin your developing.

I wouldn’t recommend using widgets that rely on a plugin because this is a very uncommon practice.

Custom WordPress widgets need to be registered in functions.php in order to be available in the theme your developing.


/**
 * Foo_Widget Class
 */
class Foo_Widget extends WP_Widget {
    /** constructor */
    function __construct() {
        parent::WP_Widget( /* Base ID */'foo_widget', /* Name */'Foo_Widget', array( 'description' => 'A Foo Widget' ) );
    }

    /** @see WP_Widget::widget */
    function widget( $args, $instance ) {
        extract( $args );
        $title = apply_filters( 'widget_title', $instance['title'] );
        echo $before_widget;
        if ( $title )
            echo $before_title . $title . $after_title; ?>
        Hello, World!
        <?php echo $after_widget;
    }

    /** @see WP_Widget::update */
    function update( $new_instance, $old_instance ) {
        $instance = $old_instance;
        $instance['title'] = strip_tags($new_instance['title']);
        return $instance;
    }

    /** @see WP_Widget::form */
    function form( $instance ) {
        if ( $instance ) {
            $title = esc_attr( $instance[ 'title' ] );
        }
        else {
            $title = __( 'New title', 'text_domain' );
        }
        ?>
        <p>
        <label for="<?php echo $this->get_field_id('title'); ?>"><?php _e('Title:'); ?></label> 
        <input name="<?php echo $this->get_field_name('title'); ?>" class="widefat" id="<?php echo $this->get_field_id('title'); ?>" value="<?php echo $title; ?>" type="text" />
        </p>
        <?php }

} // class Foo_Widget

</pr?>
1141 posts
    Has been part of the Envato Community for over 4 years Has referred 1+ members Has sold $40,000+ on Envato Market Has collected 100+ items on Envato Market
+2 more
KarmaThemes says

We do both. We add a large list of the most popular plugins for topics like social media, SEO , galleries, tranlsations etc. and just make sure they work guaranteed and if necessary skin them.

Sometimes they punch each other jQuery wise (like gTranslate never works with Sexy Bookmarks), but mostly it’s a good way since buyers will always use their own plugins regardless of how much you code yourself. So it’s always good to be able to tell them “if yours does not work, use this or that, we skinned it especially for this theme”.

All the best, Mel for KarmaThemes

2182 posts
    Has referred 200+ members Has sold $500,000+ on Envato Market Has collected 50+ items on Envato Market Elite Author: Sold more than $75,000 on Envato Market
+14 more
mpc Volunteer moderator says

Ok, so I see it is time to develop some custom widgets :) thanks for answers!

3256 posts
    Has referred 100+ members Has sold $250,000+ on Envato Market Has collected 10+ items on Envato Market Elite Author: Sold more than $75,000 on Envato Market
+9 more
ParkerAndKent says

I made something like 40 custom widgets… done one done all… are very simple.

366 posts WordPress Guy
    Has referred 1+ members Has sold $100+ on Envato Market Has collected 50+ items on Envato Market Member of the Envato Team
+5 more
Japh Envato team says

If there already exists a plugin on WordPress.org that I can use, I usually use that.

Actually, recently there was an article about a fantastic class you can use to automatically prompt users to install plugins you need for your theme!

The TGM Plugin Activation class on GitHub

2182 posts
    Has referred 200+ members Has sold $500,000+ on Envato Market Has collected 50+ items on Envato Market Elite Author: Sold more than $75,000 on Envato Market
+14 more
mpc Volunteer moderator says
Japh said
If there already exists a plugin on WordPress.org that I can use, I usually use that.

Actually, recently there was an article about a fantastic class you can use to automatically prompt users to install plugins you need for your theme!

The TGM Plugin Activation class on GitHub

Thanks! :)

701 posts
    Has been part of the Envato Community for over 6 years Has referred 1+ members Located in Canada Has collected more than 1000 items on Envato Market
chrismccoy says
Japh said
If there already exists a plugin on WordPress.org that I can use, I usually use that.

Actually, recently there was an article about a fantastic class you can use to automatically prompt users to install plugins you need for your theme!

The TGM Plugin Activation class on GitHub

works great, used this on a plugin of mine.

366 posts WordPress Guy
    Has referred 1+ members Has sold $100+ on Envato Market Has collected 50+ items on Envato Market Member of the Envato Team
+5 more
Japh Envato team says

Just to let you all know, and as @mpc has noticed already, I did a quick video run through on WPTuts+ to show how you’d use this class in a theme:

Intro To TGM Plugin Activation Class For WordPress

I hope you guys find it useful! :)

by
by
by
by
by
by