html - Wordpress PHP code to display thumbnail and title of children of children's pages -


I am working on a custom Wordpress site and need to create a code that has the title of the thumbnail and all its child subpages That means, I am displaying my own child page at 1 level on its level, but I need a parent page to display all level 3 subpages. Level 1 page - Title of all level 3 pages +

  • Level 2 pages - Thumbnail and title of all level 3 (displayed) ul>
  • Level 3 page
  • displays 3 pages
  • Level 2 page - Displays thumbnails and titles of all level 3
    • Level 3 pages
    • Level 3 pages

      At the moment I have the following code in level 2 pages. I How to tailor so that these pages (level 2) Display parent level (level 1) all level 3 thumbnails and titles? Thanks for any thoughts.

        & lt ;! - INSERT CODE - & gt; & Lt ;? Php $ child_pages = $ wpdb- & gt; get_results ("SELECT * FROM $ wpdb-> Posts WHERE Post_perrent =". $ Post-> ID. "and post_type = 'Page' ORDER BY menu_order", OBJECT '); If ($ child_pages): foreach ($ child_pages $ as pageBild): setup_postdata ($ pageBild); $ Thumbnail = get_the_post_thumbnail ($ page child-> ID, 'work-thumb'); If ($ thumbnail == "") will continue; // Skip the page without thumbnails? & Gt; & Lt; Div class = "child-thumb" & gt; & Lt; P class = "thumbnail_img" & gt; & Lt; A href = "& lt ;? = get_permalink ($ page child-> ID)? & Gt;" Rel = "bookmark" title = "& lt;? = $ PageChild- & gt; Post_title? & Gt;" & Gt; & Lt ;? = $ Thumbnail? & Gt; & Lt; / A & gt; & Lt; / P & gt; & Lt; H3 & gt; & Lt; A href = "& lt;? = Get_permalink ($ page-> ID)?" Rel = "bookmark" title = "& lt;? = $ PageChild- & gt; Post_title? & Gt;" & Gt; & Lt ;? = $ Page child-> Post_title? & Gt; & Lt; / A & gt; & Lt; / H3 & gt; & Lt; / Div & gt; By & lt;? Endforeach; end if; ? & Gt; & Lt ;! - Finnish code - & gt;    

      right has found a solution using it

      < / P>

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -