Forum Replies Created

Viewing 3 replies - 16 through 18 (of 18 total)
  • Hi,
    you can use Subdomains Plugin. It will work for you. You can see this in action here https://pankajanupam.com and write to support.

    Forum: Fixing WordPress
    In reply to: home page help

    if you do not have a home.php in your template you can create it.

    either

    you can add this code in :-

    single.php if you want to show posts on home page
    or
    page.php if you want to show pages on home page

    it’s better to create a home.php file in your theme folder. The final code look like this,

    <?php
    get_header(); ?>
    
    		<div id="container">
    			<div id="content" role="main">
    
    			<?php // The Query
    			$args = array('post_type'=>'your_post_type',
    			              'cat'=>'featured_posts',
    			              'post_per_pages'=>'3',
    			              'order'=>'ASC');
    
    				query_posts( $args );
    			// The Loop
    			     while ( have_posts() ) : the_post(); ?>
    						<h2> <a href="<?php the_permalink(); ?>">
    			 <?php the_title(); ?> </a></h2>
    			        <div> the_content(); </div>
    			<?php endwhile;
    			// Reset Query
    			wp_reset_query(); ?>
    
    			</div><!-- #content -->
    		</div><!-- #container -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>
    Forum: Fixing WordPress
    In reply to: home page help

    you can use below code just replace your post type (page,post, etc.).

    <?php // The Query
    $args = array('post_type'=>'your_post_type',
                  'cat'=>'featured_posts',
                  'post_per_pages'=>'3',
                  'order'=>'ASC');
    
    	query_posts( $args );
    // The Loop
         while ( have_posts() ) : the_post(); ?>
    			<h2> <a href="<?php the_permalink(); ?>">
     <?php the_title(); ?> </a></h2>
            <div> the_content(); </div>
    <?php endwhile;
    // Reset Query
    wp_reset_query(); ?>

Viewing 3 replies - 16 through 18 (of 18 total)