Exemplo n.º 1
0
 /**
  * 
  */
 public function postAction()
 {
     $slug = $this->getPost('slug');
     $type = $this->getPost('type');
     $postService = PostService::getSingleton();
     $postService->setName($slug);
     $postService->setPostType($type);
     $posts = $postService->getPosts();
     if (count($posts) > 0) {
         return array("post" => $posts[0]->toArray());
     } else {
         return array("post" => null);
     }
 }
Exemplo n.º 2
0
<?php

use INUtils\Service\PostService;
use INUtils\Helper\TextHelper;
/*
  Template Name: news
*/
$pS = new PostService();
$pS->setPostsPerPage(-1);
$news = $pS->getPosts();
get_header();
?>
<div id="container-app">
    <div class="container all-pad-gone">
        <?php 
echo do_shortcode('[slideshow group="blog"]');
?>
 
        <?php 
echo getTopMenu();
?>
    </div> 
    
    <!--start main content here-->
    
    <div class="container all-pad-gone">
        <div class="row">
            <div class="col-md-12">
                <h2>Blog Results</h2>
            </div>    
        </div>