Skip to content

Instantly share code, notes, and snippets.

@josesayago
Created June 7, 2013 01:09
Show Gist options
  • Save josesayago/5726399 to your computer and use it in GitHub Desktop.
Save josesayago/5726399 to your computer and use it in GitHub Desktop.
This is an example of embedding Single Latest Posts into a WordPress Template file
<?php
// Check if the plugin has been activated
if( function_exists( 'single_latest_posts' ) ) {
/**
* Custom parameters
* Set only those you want to use
*/
$parameters = array(
'title' => 'Luxury',
'title_only' => 'false',
'number_posts' => 3,
'custom_post_type' => 'cars',
'category' => 'luxury',
'category_link' => 'true',
'category_ltitle' => 'More on Luxury',
'css_style' => 'myslposts'
);
// Execute
single_latest_posts( $parameters );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment