Disabling plugin but wpenqueue is not available
No, you have to fix the plugin code. Also, send a bug report to the plugin author. I’m sure she wants to improve the plugin.
No, you have to fix the plugin code. Also, send a bug report to the plugin author. I’m sure she wants to improve the plugin.
You should use isset $id = isset( $instance[‘id’] ) ? esc_attr( $instance[‘id’] ) : ”; $number = isset( $instance[‘number’] ) ? esc_attr( $instance[‘number’] ) : ”;
If the category is Story, then make a template file, and name it as category-story.php (make sure the slug is ‘story’). Put your code in this file. WordPress will automatically display the posts from Story category using this template. (More about category templates here). And yes, you can use widgets outside of the sidebar, read … Read more
As alluded to by @Michael in the comments, the CSS classes for widgets depend on the sidebar they’re in more than the widget themselves. Those widget-specific CSS classes can be useful, but not when you’re trying to style every widget. It sounds like you may be able to use a normal element selector that targets … Read more
Your code fails because of a PHP syntax error. Things to note: Your problem is a result of your failure to indent your code correctly, resulting in things being missed. Your editor should be able to reindent code, and it should auto-indent as you type. There are no excuses for this, and it’s a 100% … Read more
Think about what is happening. You run the_post(); which sets $post to the first post in the Loop, but you don’t use that post if your sidebar is active. Then the Loop continues and $post gets set to the second post in the Loop. You’ve lost your first post. I don’t see why that first … Read more
Put this lines of code in function.php if (function_exists(“register_sidebar”)) { register_sidebar(); } Put this to sidebar.php <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?> <?php $image = new WP_query (‘showposts=1’); if(have_posts()) : while($image->have_posts()) : $image->the_post; ?> <a href=”https://wordpress.stackexchange.com/questions/115901/<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php postimage(); ?></a> <?php endwhile; endif; rewind_posts; ?>
The register_sidebar function has ‘before_widget’ and ‘after_widget’ arguments that, by default, add <li> tags with a class of widget around each widget. You can change that in your theme to add an additional <div> around each widget if li.widget is not a good enough CSS Selector or if your theme removes it. I don’t know … Read more
h2 and h3 are not html classes, they are html tags. That said, does not exists a default html tag for the widgets, because the format used to output widgets title is set when the sidebar is registered (look at ‘before_title’ argument). So how title is shown is theme related and sidebar related, does not … Read more
Unfortunately, this isn’t quite as easy as you might expect, nor is it properly achievable by using filters. WordPress offers very little hooks for widgets in general, let alone for widget content. However, as all widgets are generated by classes, you can extend the functionality WordPress offers by creating your own widget, extending the recent … Read more