php help

Taha117

New Member
Messages
8
Reaction score
0
Points
0
This is the php code i am using in my wordpress header to display pages however i wish it to never display page child. Please post the solution below

<?php
$pages = CMSTheme_GetPages(); if ($pages) { foreach ($pages as $page) { $page_id = $page->ID; $page_title = $page->post_title; $page_name = $page->post_name;
 

Nathan H

New Member
Messages
562
Reaction score
0
Points
0
it is unlikely people will give you a direct code solution, that would be cheating and ruin the fun.
You could try using an if statement inside your for-each statement to filter whether a page is displayed by checking whether it is a page child or not
 
Top