Simeon108 Posted February 10, 2017 Share Posted February 10, 2017 Forgive me, but I am ignorant of PHP with the exception of copying snippets from various sources. I have successfully used this snippet to call the children of a particular WordPress article in a list: <?php wp_list_pages('title_li=&child_of=12442') ?> I would like to constrain this call to just the children one deep, i.e., not the grandchildren, etc. Can anyone tell me what this code would be? Thank you, Brother Simeon Light of the Spirit Monastery ocoy.org Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/ Share on other sites More sharing options...
Jacques1 Posted February 10, 2017 Share Posted February 10, 2017 Have you read the documentation? I can see a “depth” parameter there. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542572 Share on other sites More sharing options...
Simeon108 Posted February 10, 2017 Author Share Posted February 10, 2017 I know there is a parameter, I don't know how to implement it. And I don't want to become a PHP expert, I just want a plug-and-play solution. Give me a finished line of code and I am a happy duckling. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542575 Share on other sites More sharing options...
Jacques1 Posted February 10, 2017 Share Posted February 10, 2017 I'm sure there are many things you want. The difficult part is to get them. What I can do is move your thread to the job section. Some programmers are willing to do small jobs like this one. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542576 Share on other sites More sharing options...
Simeon108 Posted February 11, 2017 Author Share Posted February 11, 2017 I undertand the 'title_li=&child_of=12442' part, and I understand that to call 1 deep is depth=1 but I don't know how to combine them into a single command. I know this is elementary to those who know, but I am not among the learned. Can someone show me how to combine them? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542603 Share on other sites More sharing options...
Jacques1 Posted February 11, 2017 Share Posted February 11, 2017 C'mon, is this your first day on the Internet? Have you never heard of Google? Hint: The ampersand symbol separates the parameters. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542604 Share on other sites More sharing options...
Simeon108 Posted February 12, 2017 Author Share Posted February 12, 2017 I will try working with the ampersand. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542635 Share on other sites More sharing options...
Simeon108 Posted February 12, 2017 Author Share Posted February 12, 2017 That did it. Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/303154-constraining-list-to-one-deep/#findComment-1542660 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.