Forum Replies Created

Viewing 3 replies - 31 through 33 (of 33 total)
  • Thread Starter Yeshan Perera

    (@yeshansachithak)

    <?php
    /*
     *	Template name: HomePage Template
     *	Description: Homepage Template use to create your home page as a default view.
     *
     *
    */
    ?>
    <?php get_header(); ?>
    <!-- ABOUT  -->
    <article class="column about">
    <div class="desc">
    	<div class="content">
    		<h1 class="page-title"><?php the_title(); ?></h1>
    		<div class="grids">
    			<div class="grid-12">
    				<?php//get page content and display ?>
    				<?php if (have_posts()) : ?>
    				<?php while (have_posts()) : the_post(); ?>
    					<?//this will echo the page content ?>
    					<?php the_content(''); ?>
    				<?php endwhile; ?>
    				<?php endif; ?>
    			</div>
    		</div>
    	</div>
    </div>
    </article>
    
    <?//php get_sidebar(); ?>
    
    <?php get_footer(); ?>

    This is my custom template code. So Now I want to get the content using short-code. It’s mean, I’m going to put category short-code in page content area. So, If we create a right short-code for it. Then it will display in page.

    Thread Starter Yeshan Perera

    (@yeshansachithak)

    I have five categories in common. So, I want to create short-code for make it easy. I used pages as my Navigation. I also create 5 pages.

    • 1. Put short-code in pages
    • 2. Posting under separate categories.
    • 3. call the_content(); in custom template
    • 4. when it’s view->
    • 5. Display my posts
    • 6. That’s all I want to do here
    Thread Starter Yeshan Perera

    (@yeshansachithak)

    I read all those before I developed my template. I do the same here. So, Now I want to display cat post on page. As Example, If I change in my Home page [shortcode cat=2] for [shortcode cat=5] then displayed post must be change after refreshing. That’s I want to do.

Viewing 3 replies - 31 through 33 (of 33 total)