Video Embed in Sidebar Widget with Links to Others in Category

I would create a Custom Post Type for Videos, and use in conjunction with some plugin like Simple Video Embed From there you can make a list of videos like so: <?php query_posts(‘post_type= videoss’,’showposts=20′); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <div class=”vidoes” > <?php echo p75GetVideo($post->ID, 400); ?> <h5><?php the_title(); ?></h5> … Read more

Has anyone managed to integrate the wp_editor inside a widget?

As said I think it’s quite hard to find a reliable solution because you have to take care of so many things. I go either for the way proposed by Danny van Kooten: http://dannyvankooten.com/450/tinymce-wysiwyg-editor-in-wordpress-plugin/ add and open the editor in a thickbox or another way I’ve used once, using the widget “accessibility mode” for “advanced” … Read more

Adding a widget programmatically

Because your code is just like prototype, it doesn’t display anything. That’s why your are not seeing anything in dashboard. /** * Adds Foo_Widget widget. */ class Foo_Widget extends WP_Widget { /** * Register widget with WordPress. */ function __construct() { parent::__construct( ‘foo_widget’, // Base ID esc_html__( ‘Widget Title’, ‘text_domain’ ), // Name array( ‘description’ … Read more

Calling static method in the Widget Class

Try this instead: $gloabl $myxclass; $myxclass = new Xwidget(); add_action( ‘xxx_followers’, array(&$myxclass, “cron_addB” ) ); or add_action(‘xxx_followers’, “init_xclass_and_cron”); function init_xclass_and_cron() { $myxclass = new Xwidget(); $myxclass->cron_addB(); }

Use Media upload in custom widget on wordpress 3.5

Check if this works for you: Put this code in jQuery(document).ready( function(){ function media_upload( button_class) { var _custom_media = true, _orig_send_attachment = wp.media.editor.send.attachment; jQuery(‘body’).on(‘click’,button_class, function(e) { var button_id =’#’+jQuery(this).attr(‘id’); /* console.log(button_id); */ var self = jQuery(button_id); var send_attachment_bkp = wp.media.editor.send.attachment; var button = jQuery(button_id); var id = button.attr(‘id’).replace(‘_button’, ”); _custom_media = true; wp.media.editor.send.attachment = function(props, … Read more

Randomize widgets displayed in my sidebar [duplicate]

I couldn’t see that the answers in the possible duplicate link are using the sidebars_widgets filter, so let me add it here as another possibility: The following assumes you use dynamic_sidebar() function to display your sidebars/widgets or just anything that calls the wp_get_sidebars_widgets() function. Randomize widgets: This code snippet displays all the widgets in a … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)