Quote rotator in the sidebar

You don’t need a plugin for that (and I can’t imagine that one would exist for that). A plain simple function, that you call in your sidebar, is enough: The Query function quote_posts_list() { // Retrieve 5 random posts: $posts = get_posts( array( ‘numberposts’ => 5, ‘orderby’ => ‘rand’, ‘tax_query’ => array( ‘taxonomy’ => ‘post-format’, … Read more

Stylizing external SVG files with jQuery and CSS

Sorry to say, but it’s not possible, because none of the elements from the SVG are read in the DOM, so CSS and Javascript don’t see them. All it sees is the <img> block, none of its contents. You have to import your SVGs into the page to have them be able to be manipulated. … Read more

Do I only need to import style.css for a child theme?

This question depends entirely on the Theme in question, and how it handles CSS. For a Theme that uses only a single style.css file, obviously, you only need to import style.css. For a Theme that links other stylesheets in the document head (they shouldn’t be doing this; instead, they should be properly enqueueing them), you’ll … Read more

WordPress wp-admin suddenly lost its style

This sounded very much like a caching problem. Specifically Browser Caching. Sometimes your Server may fail to fully serve an asset. Sometimes your Browser may incorrectly store an asset. This could have been a corrupt JavaScript file, or a corrupt CSS file. Either way, it was causing aesthetic problems on the Administration Screen of WordPress … Read more

Remove “says” from comments

Hope this is gonna help. Please try this snippet. Put it in your themes functions.php or you could it load it thorough a plugin or any other way- function the_dramatist_remove_says_from_comment( $translation, $text, $domain ) { //what text you want to have instead of ‘says’ in comments. For removing ‘says’ keep this blank $new_var=””; $translations = … Read more

Override custom menu widget

Ok, here we go. I extended the default Navigation widget for you. Add this to your themes functions file. After you have done this, go to widgets in your dashboard and you will see a widget called ‘Matt Royal Custom Menu’ now. Use this one. In the below code, the div class has been added … Read more

“wp_enqueue_style();” don’t load new edited style

Another solution is to use filemtime for the cachebusting, so that the last modified timestamp is used as the querystring variable. This has the advantage that of still using the browser cache, and yet, a new file is served when the file is actually changed because the querystring changes. eg. $lastmodtime= filemtime(get_stylesheet_directory().’/style.css’); wp_enqueue_style(‘whatever’, get_stylesheet_uri(), array(), … Read more