How do i pick the pages in 20-11 header?

Twenty Eleven uses wp_nav_menu() and supports one Primary Menu. If you haven’t defined one, it falls back to wp_page_menu(), which displays all pages. You can create your own custom menu in the admin area under Appearance > Menus. Select that menu to be the Primary Menu in the upper left Theme Locations box and you’re … Read more

i want attachment.php to return the image

Answer is this (thanks to WordPress Vampire here : Change Attachment Post URLs to File URLs) : Create an attachment template file within the theme. Since we are only interested in images, the file should be image.php <?php if ( have_posts() ) { the_post(); $image_url = wp_get_attachment_url(); } header(‘Location: ‘.$image_url); ?>

How to add script right after ?

Fairly certain this is not possible without editing the actual theme header.php file. The function wp_head() does in-fact include other scripts, not sure you get a choice to add a script right above everything else and to be honest I don’t see why you would need too. Your constraints seem rather strict, I’m curious why … Read more

Insert the current theme header into an external HTML/XHTML file

The key to answer was found on SO; here is the solution for my case: create a PHP file with the following: <?php define(‘WP_USE_THEMES’, false); require(‘path/to/your-wordpress-dir/wp-blog-header.php’); get_header(); ?> //Contents of the body of your XHTML page go here <?php get_footer(); ?> Now you have an external page in the format of your WordPress theme.

Cannot modify header form resubmits data on refresh

You cannot send headers once you have sent ANY html to the browser…so if you want to do whatever it is you’re trying to do with the headers, you’ll need it to be before get_header(). On that note, I’m not sure what you’re trying to do with the headers, but the ‘Confirm Data Resubmission’ prompt … Read more

infinite loop on page with comments after changing comments.php and header.php

The article you’re using is quite old, from ~2009. There are much better cleaner ways of doing commenting. As a guide, follow this: http://ottopress.com/2008/wordpress-2-7-comments-enhancements/ This is the definitive guide to implementing Comments post v2.7, and Otto is widely respected in the community. Firstly, your comments code uses have_posts() to check if there are comments, instead … Read more

How can I modify the header of RSS feed items?

this value comes from the template tag the_author(). You can also filter this. But it is important, that you check, that the filter only work on the feeds; see the follow example at the check for is_feed(). After this i change the autor name only, if the string has the value ‘name_xyz’; here is the … Read more

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