How to use add_theme_support(‘html5’)?

According to the documentation, you must pass an array of items where you want to enable HTML5 markup: add_theme_support( ‘html5’, array( // Any or all of these. ‘comment-list’, ‘comment-form’, ‘search-form’, ‘gallery’, ‘caption’, ) ); The documentation also recommends using add_theme_support() on the after_setup_theme hook, stating that the init hook may be too late for some … Read more

Functions.php Problem

I’ve seen in the pastebin the problem and merged the whole code together again. Put this first part completely into your functions.php. /** * Display previous image link that has the same post parent. * * @since 2.5.0 * Original version in /wp-include/media.php * @param string $size Optional, default is ‘thumbnail’. Size of image, either … Read more

Would to use AJAX to get an option from the database and use it in a jquery setup or is there an alternative to consider?

Enqueue the script as you would normally, & then call the JS function right after the slider HTML output (or on wp_footer), and pass a JSON config back to the function. <!– slider HTML –> <script type=”text/javascript”> jQuery( “#my_slide” ).mySlider( <?php echo json_encode( $my_config /* array or object of arguments */ ) ?> ); </script> … Read more

Customize how a WordPress theme looks like in the Theme Selector

You need to create a screenshot.png and store it in the theme directory. See the directory for the TwentyTen theme: (source: mikeschinkel.com) That of course looks like this: (source: mikeschinkel.com) UPDATE To update the theme name, author, and description you modify the header of the style.css file. Take the one from TwentyTen as an example; … Read more

What is the meaning of WordPress’s recommended css classes and where are they applied?

These classes are generated by WordPress. For instance, if a user inserts an image in his post and says it must be aligned right, WP will generate code like this in the post: <img class=”alignright” src=”https://wordpress.stackexchange.com/questions/247130/…”> Now, if your theme doesn’t define the alignright class, the image won’t be aligned right and the user won’t … Read more