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

Do not display post images on front page

Try this <?php add_filter(‘the_content’,’wpi_image_content_filter’,11); function wpi_image_content_filter($content){ if (is_home() || is_front_page()){ $content = preg_replace(“/<img[^>]+\>/i”, “”, $content); } return $content; } ?> Place in your functions.php file, call up your the_content() like normal. This will allow you to still have a feature image, but remove all images from main page. If you want to remove them from … Read more