• I’ve installed the WP e-Commerce plugin in my WP which have a custom theme.

    I would like, that the shop page from the e-Commerce and all it’s subpages is different than the other pages (an image should be changed in the design). How can I, in my page.php, check if the current page is the shop-page or any of it’s subpages?

    I need to do the same for the page listing all the blog-posts (the standard frontpage) and for each single blog-posts. My blogposts is currently moved to a blog entry in my main menu.

Viewing 1 replies (of 1 total)
  • is_single() will give you a boolean (true/false) value for your single blog posts.

    is_home() will give you a boolean for your blog list.

    I’m not sure how how the e-Commerce plugin works but maybe is_page() with a parameter will do it for you: http://codex.wordpress.org/Function_Reference/is_page

    $post should identify the page parent by ID, but only the immediate parent. Using that doesn’t work for pages nested more than two deep.

Viewing 1 replies (of 1 total)
  • The topic ‘How to find the root page?’ is closed to new replies.