Peruttu

Modify wordpress get grandchildren script

Hi there,

I have the following script:

ID.'&sort_column=menu_order&child_of='.$posts[0]->ID);

 if($child_pages) {

   foreach($child_pages as $child_page) {

     // loop stuff for child pages

     echo '';

     // get child pages of child page (grandchild pages)

     $grandchild_pages = get_pages('sort_column=menu_order&child_of='.$child_page->ID);

     if($grandchild_pages) {

       foreach($grandchild_pages as $grandchild_page) {

        // loop stuff for grandchild pages

        if(has_post_thumbnail($grandchild_page->ID)) {

           echo 'ID).'">'.get_the_post_thumbnail($grandchild_page->ID).'';

        }

       

       }

     }

   }

 }

?>

This gets grandchild pages and orders them by menu order. However it orders them under parent like:

-Parent 1

-- 1

--2

--3

-Parent 2

-1

-2

-3

I need it not to split it up by parent so the order would be:

-1

-2

-3

-4

-5

-6

Taidot: PHP, WordPress

Näytä lisää: modify wordpress, modify menu, php script echo, echo script php, echo script, php echo script, php split script, need modify wordpress, wordpress child pages, wordpress child, wordpress menu posts, wordpress split, wordpress modify menu, php parent child menu, order php wordpress, wordpress loop, menu wordpress parent, wordpress modify links, wordpress modify excerpt, php script inside wordpress, php loop script, wordpress modify widget, wordpress modify widgets, wordpress modify, split script pages

About the Employer:
( 21 reviews ) Whitstable, United Kingdom

Projektin tunnus: #4300989

9 freelanceria on tarjonnut keskimäärin 128 £ tähän työhön

wpdreamersl

Hello mate! please check private message!

110 £ GBP 1 päivässä
(228 arvostelua)
7.0
rajeshsonisl

Quality work assured. Ready to get started. Thanks.

100 £ GBP 1 päivässä
(374 arvostelua)
6.9
jigzyy

Hi, please check PM for further details. Thanks!

90 £ GBP 1 päivässä
(57 arvostelua)
6.9
xpertzdevelopers

Lets start :)

170 £ GBP 1 päivässä
(31 arvostelua)
5.4
perfectsuccessor

plz check your PMB

100 £ GBP 2 päivässä
(25 arvostelua)
5.1
kirilpanchev

Dear sir, I have over 10 years of experience in Web Development including PHP, MySQL, Wordpess, etc. I am a Zend Certified PHP Developer. I can help you out! Cheers!

30 £ GBP 0 päivässä
(26 arvostelua)
4.3
monibinny

Greeting, Have Gone through your requirement and understood, we are very sure that we can do your needs with your entire satisfaction. We have left a PMB for you plz feel free to have a look over there. Regard

150 £ GBP 10 päivässä
(3 arvostelua)
3.0
lakshyapvtltd786

Respected Sir, Thank you for taking the time to read our initial posting. I' m sure i can do this job according to your standards.We understand your requirement and we have experience to do this type of work. We are Lisää

250 £ GBP 18 päivässä
(0 arvostelua)
0.0
sangeear

Hi I am ready to work, Please see my PMB

150 £ GBP 2 päivässä
(0 arvostelua)
0.0