Suljettu

Wordpress show pages and parent pages content in right way

I have Wordpress website were I have added multiple pages, subpages and third level pages. Now I need to display them on page.

Below is javascript which i used to fetch categories.

$allServices = $my_wp_query->query($allServicesArg);

$serviceParentNames = array();

foreach ($allServices as $service) {

$parentPostName = get_post($service->post_parent)->post_name;

$serviceParentNames[$parentPostName] = true;

$services[$parentPostName] = $services[$parentPostName] ?: array();

array_push($services[$parentPostName], $service);

}

$level1 = array();

$pages = array(

'numberposts' => '-1',

'post_type' => 'page',

'meta_key' => '_wp_page_template',

'meta_value' => 'page-templates/[login to view URL]',

'post_status' => 'publish',

);

foreach (get_posts($pages) as $page) {

$level1[$page->post_name] = $page;

}

$level2 = array();

foreach ($level1 as $level_1_page) {

foreach (get_childs($level_1_page->ID) as $level_2_page) {

if (isset($serviceParentNames[$level_2_page->post_name])) {

$level2[$level_1_page->post_name] = $level2[$level_1_page->post_name] ?: array();

array_push($level2[$level_1_page->post_name], $level_2_page);

}

}

// Remove empty categories

if (!isset($level2[$level_1_page->post_name])) {

unset ($level1[$level_1_page->post_name]);

}

}

Below is my HTML which should be filled

<div class="col-holder">

<strong class="heading">

<a href="#">Level 2 Menu</a>

</strong>

<ul class="submenucat">

<li><a href="#">Level 3 Link</a></li>

</ul>

</div>

Taidot: HTML, Javascript, MySQL, PHP, WordPress

Näytä lisää: wordpress display child pages on parent page template, wordpress parent child pages, what is a parent page in wordpress, how do i make a parent page in wordpress, wordpress page attributes parent, how to add template option in page attributes in wordpress, wordpress parent page not showing up, wordpress subpage menu, wordpress adult content, wordpress theme content management, wordpress automatic content creation linking, adding automatically content parts selected pages, wordpress pop content plugin, web pages link building hyderabad, wordpress header content, wordpress export content, wordpress adult content plug, customize wordpress parent dropdown, wordpress pull content api, wordpress write mysql script add pages

Tietoa työnantajasta:
( 32 arvostelua ) Riga, Latvia

Projektin tunnus: #17957852

9 freelanceria on tarjonnut keskimäärin %project_bid_stats_avg_sub_26% %project_currencyDetails_sign_sub_27% tähän työhön

saagark22

Hi, By the way code you shared is PHP code not JavaScript code anyways I can show the multilevel pages (normal, subpage and third level) on one page as links, from there all pages can be opened.

$61 USD 2 päivässä
(469 arvostelua)
7.3
webxtor

Hello. The code you shown is PHP not javascript but I can help you. Thanks

$77 USD 1 päivässä
(314 arvostelua)
6.9
amutinda

Hi there, Thanks for the project. I am an experienced WordPress developer and i read and understood your requirements. I am available and ready to take up your project and ensure delivery to your expectations. Rega Lisää

$50 USD 1 päivässä
(127 arvostelua)
6.1
radimosve

Hello how are you? Over 60 projects successfully completed. Hi mfrolovs! Please Send me a message so that we can discuss more about this project

$45 USD 5 päivässä
(59 arvostelua)
5.7
aaronc333

Hi there, why are you getting the list of categories from the posts? You need to query up to down (not down to up - from post to category). Do you have a nested category structure too? sub category under category. Lisää

$70 USD 0 päivässä
(8 arvostelua)
4.2
brightstar928

dear I checked your post carefully. I can do your project perfectly Please contact me and discuss more. Thank you.

$45 USD 2 päivässä
(14 arvostelua)
3.4
dipakbbsr

HEY, ITS NOT CLEAR IF YOU ARE ASKING FOR A CHANGE OR YOU NEED ANY HELP WITH YOUR CODE. ANYWAY WE CAN DISCUSS AND FIX THIS NOW. THANKS FOR CONSIDERING.

$25 USD 0 päivässä
(4 arvostelua)
2.6
$45 USD 10 päivässä
(0 arvostelua)
0.0
creativesoft7

Dear Prospect Hiring Manager. Thank you for giving me a chance to bid on your project. i am a serious bidder here and i have already worked on a similar project before and can deliver as u have mentioned I am a Fu Lisää

$58 USD 7 päivässä
(0 arvostelua)
0.0