Jump to content

daclarkie

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by daclarkie

  1. HI folks, hope this looks better. Using javascript works for me. Include following code in template file: <?php //If portfolio page make first child the current page $portfoliopage = $pages->get(1019); $posts = $pages->find("parent=$portfoliopage, sort=title"); if($page == $portfoliopage): $url = $posts->first()->url; ?> <script type="text/jscript"> location.replace("<?= $url ?>"); </script> <?php endif; ?> You can sort the posts array any way you like. For the latest addition use "sort=-sort" Success!
  2. Using javascript works for me. Include following code in template file: <?php //If portfolio page make first child the current page $portfoliopage = $pages->get(1019); $posts = $pages->find("parent=$portfoliopage, sort=title"); if($page == $portfoliopage): $url = $posts->first()->url; ?> <script type="text/jscript"> location.replace("<?= $url ?>"); </script> <?php endif; ?> You can sort the posts array any way you like. For the latest addition use "sort=-sort" Success!
×
×
  • Create New...