Problem with custom function from jQuery slider tutorial

replace slideshow_featured_posts function from that tutorial with this: function slideshow_featured_posts() { $featured = 1; // Assuming that the name of the category ID number 1 is “Featured”. $count = 3; // How many post to be shown as slides. Ideally, it should be more than 3 posts. add_filter(‘excerpt_length’, ‘hook_excerpt_featured_length’); $Silder_query = new WP_Query(array(‘cat’ => $featured, … Read more

Moved wp-content and got problem with themes directory?

Did you set these constants in wp-config.php? Btw. the plugin constants are optional. On my development instance, I’ve set the following before ABSPATH and it works without any problems: define(‘WP_CONTENT_DIR’, $_SERVER[‘DOCUMENT_ROOT’] . ‘/blog/wp-content’); define(‘WP_CONTENT_URL’, ‘http://’ . $_SERVER[‘HTTP_HOST’] . ‘/blog/wp-content’); Limiations: a) If you use SSL, you should also check for the rigth protocol with is_ssl(). … Read more

Replace TimThumb in existing WordPress Themes

You have three options here: Use the_post_thumbnail() You say you’ve already done this with one theme. This is really the best solution because it keeps everything using core code (which is frequently updated) rather than third-party libraries. Upgrade TimThumb Since the “most recent” issues, they’ve released a new version of TimThumb that corrects the security … Read more

Custom Database Table and foreach

Assuming you have table that’s prefixed with the WordPress prefix (even if it’s not the default one), and the table is called table. Then the following code should select everything, and allow you to go through each row. In this example, it goes through each row and outputs the content of the field foobar. global … Read more