OpenBayou Posted December 31, 2016 Share Posted December 31, 2016 Hi, I'm creating my own theme and need help with showing all pages from a parent that's called recommendations. Thanks for the help. Link to comment Share on other sites More sharing options...
Klenkes Posted December 31, 2016 Share Posted December 31, 2016 One way of doing it would be: foreach($pages->find("parent=recommendations") as $child){ echo $child->title; } but there are many more ways to accomplish that goal. Best starting point would be to read the docs of selectors 5 Link to comment Share on other sites More sharing options...
OpenBayou Posted January 1, 2017 Author Share Posted January 1, 2017 One more question. I'm trying to find a way to show the URL of an image that's in the page. The image field is called Image. I tried <?php echo $child->Image;?> and all it will output is the name of the file (image.jpg). Link to comment Share on other sites More sharing options...
adrian Posted January 1, 2017 Share Posted January 1, 2017 $child->Image->url; 5 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now