getPages()
Description
Returns an array of all pages so that you can do fun things like generate your own menu HTML.
Example output
array(
0 => array(
'id' => 1,
'name' => 'Tribute',
'slug' => 'tribute',
'url' => '',
'text' => 'Secretary wins all the awards in my eyes.',
'content_type' => 'projects',
'content_options' => 'show= big',
'hidden' => 0,
'parent' => 0,
'pos' => 0
),
1 => array(
'id' => 2,
'name' => 'About',
'slug' => 'about',
'url' => '',
'text' => 'I am me. Who is me? You are me.',
'content_type' => 'none',
'content_options' => '',
'hidden' => 1,
'parent' => 0,
'pos' => 1
)
)
Usage
<?php
$pages= getPages();
?>
Examples
<?php
$pages= getPages();
foreach ( $pages as $page ):
echo $page['name'];
echo pageName(); // template tags only work if you set the variable $page in the loop
// Other crazy shit...
endforeach;
?>
-
FAQ
- What is the Page Type and how do I use it?
- How do I make blog pagination work?
- How can I make next/previous buttons to navigate my projects?
- How do I include Vimeo, YouTube, SoundCloud etc in my projects, pages, blog posts?
- How do I make excerpts for my blog posts? (Using the {more} tag)
- View all (2 more)
-
General Documentation
-
Themes
-
Code Documentation