Skip to content

PHP Components

Nick Haskins edited this page Nov 29, 2013 · 5 revisions

Soren has components. Think of components as sections, or leafs, or widgets. Soren components are PHP functions that you drop into a page template. They work similar to shortcodes, where you can pass different arguments to control the behavior. All components are 99% un-styled, giving you the freedom to design and build with no restrictions.

Navigation

Creates button that, when toggled, shows off canvas navigation menu.
soren_push_nav();

Args

$depth - int
$menuclass - string
$containerclass - string


Gallery

Creates an un-styled gallery in a few different formats.
soren_gallery('default', 'full', 200);

Args

$type - default / grid
$adjacent - any registered image size
$pinsize - int


Get Posts

Returns a simple list of posts.
soren_post_list($category = '', $num = 5)

Args

$category - int - pass category ID to pull posts from
$num - int - number of posts to pull


Pagination

Creates a paginated section to use with post loop.
soren_pagination()

Args

Post Sharing

Creates an un-styled post sharing system
soren_post_shares()


Post Author

Creates a post author component with optional extended profile information. Clean arg outputs with no markup.
soren_post_author($extended = '', $avatarsize = 80, $link = false, $clean = false, $postedby = 'Posted by')

Args

$extended - boolean
$avatarsize - int
$link - boolean
$clean - boolean
$postedby - string


Posted On

Is similar to soren_post_author but is more traditionally marked up for general blog posts. Prints HTML with meta information for the current post-date/time and author.
soren_posted_on()


Post Nav

Creates a post navigation system with optional adjacent post feature.
soren_post_nav()

Args

$adjacent - boolean

Clone this wiki locally