Why are theme templates organized as multiple point of entry PHP files instead of reusing your theme’s index.php?

Theme template files are organized in this way because of the WordPress Template Hierarchy. Since all primary template files eventually fallback to index.php, it is certainly possible to use only the index.php primary template file. There are advantages and disadvantages to using either method. Generally speaking, the usefulness/efficiency of defining template files is inversely proportional … Read more

Archiving annual festival site

Personally. I would archive the 2010/etc sites to Pure HTML. This plugin would do the job http://wordpress.org/extend/plugins/static-html-output-plugin/ This WordPress codex post describes another method. With using WordPress in its own Sub Directory and archiving sites: http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Pointing_your_home_site.27s_URL_to_a_subdirectory

Alternate header image

You can try this Random from a set of images : <img src=”http://www.mywebsite.com/images/image_<?php echo rand(1,10); ?>.jpg” alt=”” /> This would load a random image from image_1.jpg, image_2.jpg … to image_10.jpg or $images = array(“cool_image.jpg”, “nice_pic.jpg”, “sunset.jpg”); $rand = array_rand($images); <img src=”http://www.mywebsite.com/images/<?php echo $images[$rand]; ?>” alt=”” /> This would select a randow image from thoses specified … Read more

How to control WordPress Search Behavior?

What you tried to use is broken. add_filter( ‘pre_get_posts’, ‘modified_pre_get_posts’ ); function modified_pre_get_posts( WP_Query $query ) { if ( $query->is_search() ) { $query->set( ‘post_type’, array( ‘page-home’ ) ); } return $query; } That function definition is not valid. You would have seen an error if you had debugging enabled. You need: add_filter( ‘pre_get_posts’, ‘modified_pre_get_posts’ ); … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)