Get current post’s child page?

$ancestors = array(); $ancestors = get_ancestors($post->ID,’page’); $parent = (!empty($ancestors)) ? array_pop($ancestors) : $post->ID; $parent should be the topmost page parent. However, if you are using a WordPress generated menu there is a pretty good chance that there is already a item identified by a CSS class as the parent. Take a good look at the … Read more

Post thumbnail dependant on category

You could do this : $categories = get_the_category($post->ID); $cat = $categories[0]->cat_name; if ( has_post_thumbnail() && $cat == ‘news’ ) { the_post_thumbnail(‘medium’); } *EDIT: the code grabs the post category, line 2 grabs cat name from the object and I use it as a condition in if statement *

how to create a new page that is not in the hierarchy?

What your asking is really quite simple, but you need to take your time to read about creating new page templates for WordPress. Take a look at this. You need to create a custom loop that shows your desired posts preferably with WP_Query for best practice.

Posts are being posted in two categories instead of 1

If you mean that the post shows up on the blog index and in the category index then that is how it is supposed to work. Based on your statement that you “want [your] graphic design and [your] blog to be separate” then create a custom post type for your graphic design. Copy the “Books” … Read more

How can i add new post on new page

Posts don’t “add” to particular pages. “Pages” are static by default but in combination with Custom Page Templates you can make them do just about anything. You’d need to create a template for each of your pages and query for your posts by category, or tag, or a custom meta field… something like that. It … Read more

can’t post immediately

Deactivate all plugins, does the behavior persists? No: activate plugins one by one until you find the one causing the issues. yes: activate twenty eleven or twenty twelve theme, does the behavior persists? no: use a different theme. yes: is WordPress updated? Is your server up to date with current php and mysql? no: update … Read more

WordPress Post Grid

This isn’t really a WordPress related question, and you can get your desired result by a simple PHP loop: $i = 1; foreach ($array as $var) { if ($i==7) { // six items already displayed. // Do whatever you want here // now restart the count $i = 1; } // display your thumbs or … Read more