Jump to content

daclarkie

Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About daclarkie

  • Rank
    Newbie
  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...