![]() |
Cannot order subpages list, why? - Printable Version +- GetSimple Support Forum (http://get-simple.info/forums) +-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3) +--- Forum: General Questions and Problems (http://get-simple.info/forums/forumdisplay.php?fid=16) +--- Thread: Cannot order subpages list, why? (/showthread.php?tid=10675) |
Cannot order subpages list, why? - SalamandersPL - 2019-02-09 Hi. Relatively small problem. I can not order the subpages i want to echo with the loop: PHP Code: <?php The $ordered variable do nothing. Why? RE: Cannot order subpages list, why? - SalamandersPL - 2019-02-15 Hello? Can anyone can help me to order this list? RE: Cannot order subpages list, why? - smdp-1971 - 2019-02-15 (2019-02-15, 03:05:04)SalamandersPL Wrote: Hello? In theme folder create functions.php and add this code: PHP Code: function getChildrenTitle($page) Call the function in template: PHP Code: <?php getChildrenTitle('term-conditions');?> RE: Cannot order subpages list, why? - SalamandersPL - 2019-02-18 Still, i have them ordered different way on the page than in GetSimple. https://salamanders-studio.com/temp/getsimple.png https://salamanders-studio.com/temp/result.png (if you ask about my getsimple look: this is a css plugin, not modified core) RE: Cannot order subpages list, why? - smdp-1971 - 2019-02-19 (2019-02-18, 19:27:07)SalamandersPL Wrote: Still, i have them ordered different way on the page than in GetSimple. I see that you use numbers in the title (h2). So try this code: PHP Code: function getChildrenTitle($page) RE: Cannot order subpages list, why? - SalamandersPL - 2019-02-20 Your code gave me this: https://www.salamanders-studio.com/temp/result2.png Well, it would be great to have that option to sort it same as displayed in CMS. And what is "menuOrder" for? ![]() RE: Cannot order subpages list, why? - smdp-1971 - 2019-02-20 (2019-02-20, 09:43:03)SalamandersPL Wrote: Your code gave me this: Do you have install i18N plugin? If you have, create a new component (Theme->Edit Components) with this code: Component name -> custom-nav PHP Code: <li class="<?php echo $item->classes; ?>"> PHP Code: <?php if (return_page_slug()=='term-conditions') { ?> RE: Cannot order subpages list, why? - SalamandersPL - 2019-02-20 You are a great man. Thank you! RE: Cannot order subpages list, why? - smdp-1971 - 2019-02-21 (2019-02-20, 22:34:40)SalamandersPL Wrote: You are a great man. Thank you! You're welcome! |