Display a specified content on a Page and all its child pages

You can do that by using this nice little function: function is_page_or_child_of($slug){ global $post; if (empty($slug)) return false; //is it the page? if ($post->post_name = $slug) return true; //check the children $page = get_page_by_path($slug); $children = get_pages(‘child_of=”.$page->ID.”&sort_column=post_date&sort_order=desc’); foreach ($children as $sub){ if ($post->ID == $sub->ID){ return true; } } return false; } and instead of … Read more

the_excerpt function not showing image

If you did not set an explicit excerpt for your post in the post editor, WordPress by default calls wp_trim_excerpt() to auto-generate an excerpt. This function throws out all HTML tags to make life simple. the_content() does not do this when it splits your post on a <!–more–> tag. If you don’t want this default … Read more

search and add in wordpress content

Try the Search and Replace plugin: http://wordpress.org/extend/plugins/search-and-replace/ This searches for strings and will allow you to search for every instance of video-x-player, using a regex for the number. If you don’t want to use regex searching on video- will bring up every instance that is already in your database. If you intend to keep using … Read more

How to show content for posts of a specific category only

You can use the in_category function to test if the current post in the loop is in the specific category you want to display full content for. For example if ( in_category( ‘my_category’) ) : the_content(); else : the_excerpt(); endif; For more information on the in_category function see the WordPress codex at: http://codex.wordpress.org/Function_Reference/in_category