No “available widgets” (wordpress 3.2.1 multisite)
Stupid mistake, I commented this out by mistake in wp-includes/widgets.php line 323: function register($widget_class) { // $this->widgets[$widget_class] = & new $widget_class(); }
Stupid mistake, I commented this out by mistake in wp-includes/widgets.php line 323: function register($widget_class) { // $this->widgets[$widget_class] = & new $widget_class(); }
I looked for one of these recently, as I have seen them, but I believe they are only bundled with some commercial themes. I ended up making one using CPT’s and jQuery Tools, it was pretty simple. The steps, Create a CPT with only the featured image upload ( to keep ad size to 175px … Read more
function widget_sidebarLogin() { echo “Content of Your Widget”; } wp_register_sidebar_widget( ‘sidebarLoginId’, // your unique widget id ‘SidebarLogin’, // widget name ‘widget_sidebarLogin’, // callback function array( // options ‘description’ => ‘Some Descriptions’ ) );
To make the first post different you could add a post counter and change the output on the first loop. $counter = 0 while ( $cat_posts->have_posts() ) { $cat_posts->the_post(); $counter++; if ( $counter == 0 ) { // Out put the different loop } //Normal loop output
You can use get_template_directory_uri() and it will return the url up to the template directory then you can just append the ‘/images/FILENAME.EXT’ to it to pull in the image.
Moved from comment to answer: Inside your taxonomy registration code, ‘_builtin’ => true shouldn’t be set to true, that’s specifically for built in taxonomies only(you shouldn’t even be setting that arg) and also conflicts with your args array which specifically asks for a false value.
I can’t test it now, but the following should work… query_posts(‘post_type=sponsors&meta_key=_vof_sponsor_level&meta_value=Gold’); if (have_posts()) : echo “<div class=”imageshadow sponsorwidgetslides”>”; while (have_posts()) : the_post(); if ( get_post_meta($post->ID, ‘url’, true) ) { ?> <a href=”https://wordpress.stackexchange.com/questions/39982/<?php echo get_post_meta($post->ID,”url’,true); ?>”><?php the_post_thumbnail(‘sponsorwidget’);?></a> <?php } else { the_post_thumbnail(‘sponsorwidget’); } endwhile; echo “</div><!–/.imageshadow–>”; echo “<a class=”widgetlink” href=””; bloginfo(“url’); echo “/sponsors’>View all Sponsors »</a>”; … Read more
No offense, but your code is a COMPLETE mess, so I’m just going to give you clean code and then tell you how to target it. register_sidebar( array( ‘name’ => ‘Post Sidebar’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget widget-%2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<div class=”titlediv”>’, ‘after_title’ => ‘</div>’, ) ); Then to target the title … Read more
There is no ability in the default widget, you will need to use third-party plugins to acheive your goal. Here are some that I have found. http://wordpress.org/extend/plugins/yd-recent-posts-widget/ http://wordpress.org/extend/plugins/get-recent-comments/
The function that replaces is_taxonomy() is named taxonomy_exists(). Than there’s also is_tax() and is_tag() that check if the query is for a taxonomy archive page. EDIT $selected_sidebar_replacement == ‘0’ || $selected_sidebar_replacement == ” won’t work. You’re not checking the type. Better do it like this: if ( ! $selected_sidebar_replacement OR emtpy( $selected_sidebar_replacement ) )