- This topic is empty.
-
AuthorPosts
-
February 17, 2011 at 8:28 am #31666sir_tismaMember
Hello!
Let’s say I have 3 big categories (pages with custom template): Cat 1, Cat 2 and Cat 3.
I want to display all the child pages (newer first) from each category.Here is what I want to do http://www.shopmobil.ro/aparate-masaj-fitness.
I found here something, but it’s not usefull: http://codex.wordpress.org/Function_Reference/wp_list_pages#List_whole_subpages
The product titles (Product1,2,3…etc) had to be pulled out dynamic, the same for the picture.
I followed Chris tutorial Lynda.com – WordPress 3.0 Creating and Editing Custom Themes, but I didn’t figure out.
In that tutorial, he explained the situation if you had Cat1 -> Cat 1.1( child category of Cat 1) -> Product 1(child page of Cat 1.1).Thank’s,
CristianFebruary 17, 2011 at 9:37 am #59770jacorreParticipantIf I’m understanding what you’re requesting, I believe you’re looking to use the following:
The above will list the subpages for the parent page of id 7. Change the number as needed.
February 17, 2011 at 9:57 am #59772sir_tismaMemberthank’s, it’s working, but not in the way that I want.
I want to display the pages like here http://www.shopmobil.ro/aparate-masaj-fitness
not in an ul.this is the code
ID, "categories", true);
// example value = "Sprockets|92,Sprunklers|94"$allCategories = explode(",", $categoriesCF);
// $allCategories[0] = "Sprockets|92"
// $allCategories[1] = "Sprunklers|94"foreach ($allCategories as $category) {
$pieces = explode("|", $category);
// $pieces[0] = "Sprockets"
// $pieces[1] = 92$link = get_permalink($pieces[1]);
echo "";
echo "" . $pieces[0] . "
";
query_posts("posts_per_page=-1&post_type=page&post_parent=$pieces[1]");
while (have_posts()) : the_post(); ?>
" class="product-jump" title="">
ID, "product_regular", true) . "' />"; ?>
";
};
?>February 17, 2011 at 10:28 am #59741sir_tismaMemberproblem solved, thank you all!
AuthorPostsViewing 4 posts - 1 through 4 (of 4 total)- The forum ‘Back End’ is closed to new topics and replies.