Change a Page’s Header Image

The body tag has quite a few classes eg “home page page-id-### page-template page-template-template-name” you could make use of to customize the header with css. Just specify a different target: .home .header-wrapper { background-image: url(img/some-other-image.png); }

WordPress backend:How to hide some specific pages under Pages–>All Pages

I used the following code snippet into one of my project. Use the code snippet into the functions.php within the main PHP tag: // HIDE SOME PAGES FROM THE EYE OF EDITOR function wpse20131126_exclude_pages_from_admin($query) { global $pagenow, $post_type; if (is_admin() && current_user_can(‘editor’) && $pagenow==’edit.php’ && $post_type ==’page’) { $query->query_vars[‘post__not_in’] = array( ’77’, // the security … Read more

This code won’t find authors page?

Building URLs to WP resources in this fashion is fragile and shouldn’t be done. You should use appropriate API function to generate the links, in this case probably get_author_posts_url().

Post Fetching Ignoring Sort_Column?

I’m not sure why you use the sort_column parameter, it’s not supported by the WP_Query() class. According to the Codex, the correct way to sort, is to use the order and orderby parameters. Please try this: $args = array( ‘post_type’ => ‘page’, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’, // DESC is the default order ‘post_status’ … Read more

the_content of template page

Have you tried using the whole loop? <?php $loop = new WP_Query(); if ( $loop->have_posts() ) : while ( $loop->have_posts() ) : $loop->the_post(); ?> <!– before –> <?php the_content(); ?> <!– after –> <?php endwhile; else: ?> <p><?php _e( ‘Nope. Doesn\’t exist’ ); ?></p> <?php endif; ?>

Why isn’t WordPress respecting my HTML?

Figured it out. You just need to add the following to your functions.php: remove_filter( ‘the_content’, ‘wpautop’ ); remove_filter( ‘the_excerpt’, ‘wpautop’ ); http://codex.wordpress.org/Function_Reference/wpautop#Disabling_the_filter

Add a static page that links to homepage

To add a link to the homepage in your navbar, you can use the following function to add a link to the home page in wp_page_menu_args function wpse01_home_link( $args ) { if ( ‘main-menu’ === $args -> theme_location){ if (! isset( $args[‘show_home’] ) ) $args[‘show_home’] = _x( ‘Home’, ‘homepage’ ); } return $args; } add_filter( … Read more

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