What does is_page_template() compare against?

Your condition should be written like this: if (is_page_template(‘path/file.php’)) { // Do stuff } I believe the confusion is a result of two things: The docs refer to “name” ambiguously. Specifying “file name” would make the documentation much more clear. The code behind is_page_template() shows the get_page_template_slug() function at its core. This function actually returns … Read more

Upload Multiple Files With media_handle_upload

here if you use custom template past this in the begining <?php if( ‘POST’ == $_SERVER[‘REQUEST_METHOD’] ) { if ( $_FILES ) { $files = $_FILES[“my_file_upload”]; foreach ($files[‘name’] as $key => $value) { if ($files[‘name’][$key]) { $file = array( ‘name’ => $files[‘name’][$key], ‘type’ => $files[‘type’][$key], ‘tmp_name’ => $files[‘tmp_name’][$key], ‘error’ => $files[‘error’][$key], ‘size’ => $files[‘size’][$key] ); … Read more

numberposts? showposts? posts_per_page?

In my opinion, deprecating numberposts would not make sense, as numberposts is used to query x amount of posts, whilst posts_per_page is used to denote how many posts per page are being shown during pagination. If you were to deprecate numberposts in favor of simply posts_per_page, then pagination would not exist. ie: “numberposts” => 50, … Read more

Is there a flowchart for WordPress loading sequence?

There is this rather in-depth explanation found at, Part 1 http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-2315/ Part 2 http://theme.fm/2011/09/wordpress-internals-how-wordpress-boots-up-part-2-2437/ Which also includes some diagrams/flowcharts. and… This is also just the start of understanding the WordPress initialization process to which also should include information about the template hierarchy, as well as inspecting which hooks are fired on which pages and when. … Read more

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