Modifying .page-content background image

WordPress does not have such an option by default; you will have to create the functionality for per-post background images – which is entirely possible. Your best bet might be to use post custom meta to link/upload per-post background images, and then enqueue a dynamic stylesheet that applies that image as the background for the … Read more

Check if page has subpages

You have to pass the parent page id to the wp_list_pages function instead of the global $post->ID in your subpages. function wpse33151_getSubpages() { global $post; $parents = get_post_ancestors($post->post_id); krsort($parents); $parents = array_merge(array(), $parents); if (is_home() || is_single()) { $id = get_option(‘page_for_posts’); $parent = get_post_ancestors($id); $id = $parent[0]; } elseif($parents) { $id = $parents[0]; } else … Read more

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

Archive limit the text of the_content

I’m assuming ‘Archive Page’ is a custom template and not either of the WP archive pages (category/date/author/tag/taxonomy). Try using this: <?php add_filter(‘the_content’, ‘trim_content’); function trim_content($content) { if(is_archive()) { //use your own trick to get the first 50 words. I’m getting the first 100 characters just to show an example. $content = (strlen($content) <= 100)? $content … Read more

way to make all pages with certain tags public?

I am not entirely sure what you’re asking, so I’m going to stake a wild stab in the dark until you can provide more information provided I don’t tell you exactly what you wanted to know. If by public you mean; pages with a certain tag lets say for this example the tag is ‘public’ … Read more

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