Skip to content
Read For Learn
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP
Read For Learn
  • Database
    • Oracle
    • SQL
  • C
  • C++
  • Java
  • Java Script
  • jQuery
  • PHP

get-children

get_category_children/ the new get_term_children not work

get_term_children returns an array or an object (WP_Error) and you are treating it like a string when you try to feed it to substr. I am not sure what you are trying to do with that line of code but in general you need to check that you are dealing with an array and not … Read more

Categories categories Tags categories, get-children, terms, walker

get_term_children specific no id

Based on your comment: the problem is that I am in this situation category-> training-> basketball, according to the archive page taxonomy basketball, I would like to let all the training children out and I would not do it with the id What you’re actually trying to do is get all terms that are ‘siblings’ … Read more

Categories custom-taxonomy Tags custom-taxonomy, get-children, taxonomy

Get Child Custom Post Content on Single.php?

If I understand your question correctly, you try to just get the children and ignore the parent. Dont know where post_child => 0 comes from but I’d use post_parent => $parent_id instead. In that case you have to catch the parent ID before you do any new queries. If you do something like this at … Read more

Categories wp-query Tags child-pages, get-children, query, single, wp-query

List direct children of page

Try this: wp_list_pages(array(‘child_of’ => $post->post_parent,’exclude’ => $post->ID, ‘depth’ => 1)) Read the codex for more details.

Categories posts Tags functions, get-children, php, posts

get_children() returns ALL attachments instead only those attached to ‘post_parent’

hat I do: in my template that I use to display posts within the standard loop, I make a call to above function: fs_gallery_featured_thumbs( $post->ID ) (originally I used the_ID() instead of $post->ID which gave me trouble. I guess bescause the_ID() actually echoes the ID, rihgt?). Exactly. The problem isn’t in your function itself, but … Read more

Categories get-children Tags get-children

Check if post has image

Check if post has image

Categories images Tags get-children, images

WordPress list child pages of custom post type

WordPress list child pages of custom post type

Categories plugins Tags custom-post-types, get-children, plugins, posts, wp-list-pages

How to show the view more on my display of pages shortcode

got it working now… I added a counter $i = 0; $childnum = count($children); just after the if statement of the children. & added this code if ($i == $childnum – 1) { $output .= ‘<div class=”viewmore”>’. $viewmore .'</div>’; } $i++; after the the code: $output .= ‘<div style=”clear:both;”></div></div>’; …Thanks again.. 🙂

Categories pages Tags child-pages, get-children, pages, shortcode

How to display child pages with in a limited child content?

How to display child pages with in a limited child content?

Categories child-pages Tags child-pages, get-children

Why does the first category returned get echoed twice?

Because you are echoing the $childcat->cat_name each time a post passes the validation. Remember that you are inside the loop and for each post that matches your condition your are echoing. You seem to be wanting to print a list of categories that are a child of 19 but I don’t see why you’d go … Read more

Categories children Tags categories, children, get-children
Older posts
Page1 Page2 … Page6 Next →
+ More

Recommended Hostings

Cloudways: Realize Your Website's Potential With Flexible & Affordable Hosting. 24/7/365 Support, Managed Security, Automated Backups, and 24/7 Real-time Monitoring.

FastComet: Fast SSD Hosting, Free Migration, Hack-Free Security, 24/7 Super Fast Support, 45 Day Money Back Guarantee.

Recent Added Topics

  • Bug in translation system: load_theme_textdomain() returns true, files are available and accessible but the language defaults to english
  • Custom Elementor controls not appearing in the widget Advanced tab using injection hooks
  • Get the name of the template/*html file used
  • Trying to Add Paging to Single Post Page
  • Sharing media files between live and staging servers
  • How to display the description of a custom post type in the dashboard?
  • Critical error on image display
  • Copying WP data and files into new install?
  • How to determine the DirectAdmin WordPress backup date?
  • How to get list of ALL tables in the database?
© 2026 Read For Learn
Next Page »
  • Database
    • Oracle
    • SQL
  • algorithm
  • asp.net
  • assembly
  • binary
  • c#
  • Git
  • hex
  • HTML
  • iOS
  • language angnostic
  • math
  • matlab
  • Tips & Trick
  • Tools
  • windows
  • C
  • C++
  • Java
  • javascript
  • Python
  • R
  • Java Script
  • jQuery
  • PHP
  • WordPress