All content on one page for single page navigation

wdalmijn's Avatar

wdalmijn

22 Feb, 2014 03:12 PM

I was wondering if someone has example code available for putting all the content-categories (e.g. blog, projects, contactinfo) on a single page. I would like to create a single page navigation site such as the main secretary site, and if such code is easily available it would save me a lot of time :-). Thanks in advance!

  1. Support Staff 1 Posted by Mikael on 28 Apr, 2014 03:49 PM

    Mikael's Avatar

    This could become a little messy, but you can use the layout_default.php page and customize the behaviour by doing the following:

    <?php echo projects(); ?>
    <?php echo blog(); ?>
    

    That will display all projects and all blog posts. Take a look at the documentation to customize these: http://help.thesecretary.org/kb/code-documentation/projects and http://help.thesecretary.org/kb/code-documentation/blog

    To output all pages, you can use a combination of page template tags to pull out specific pages, or you can loop through them all with some simple PHP code , as described at the bottom of this page: http://help.thesecretary.org/kb/code-documentation/getpages . Also, refer to these tags to output the text or content of individual pages: http://help.thesecretary.org/kb/code-documentation/pagetext, http://help.thesecretary.org/kb/code-documentation/pagecontent, http://help.thesecretary.org/kb/code-documentation/pagename

  2. 2 Posted by Karel Tromp on 07 Jul, 2015 06:42 PM

    Karel Tromp's Avatar

    here is a picture from the situation as described

  3. Support Staff 3 Posted by Mikael on 15 Jul, 2015 03:35 PM

    Mikael's Avatar

    It's hard to tell what is going on exactly - can you post the code you are using in your theme? (just the PHP)

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac