How to create multiple blog pages like in the demo?

  • Posted in : Read WP
  • Yingying
    Participant

    Hi!

    I wonder how I can create multiple blog pages like you did for the demo homepage? I only found you can have 1 blog set up in Appearance.

    Thanks,
    Yingying

    Mehmet S.
    Keymaster

    Hi, only one blog type can be used at a time. You can make multiple blog pages by navigating category based menu links. The demo site has a special functionality.

    Thanks

    Yingying
    Participant

    Thanks. If the demo has the functionality, would you make it work for the actual downloadable files too? It’s somewhat misleading.

    Mehmet S.
    Keymaster

    Edit your theme’s index.php file like this and then use url parameter like in the demo site:

    <?php
    	$blog_type = 'No Sidebar';
    	
    	if ( @$_GET['blog_type'] == 'sidebar' )
    	{
    		$blog_type = 'Sidebar';
    	}
    	elseif ( @$_GET['blog_type'] == 'masonry' )
    	{
    		$blog_type = 'Masonry';
    	}
    	
    	
    	if ( $blog_type == 'Sidebar' )
    	{
    		get_template_part( 'blog', 'sidebar' );
    	}
    	elseif ( $blog_type == 'No Sidebar' )
    	{
    		get_template_part( 'blog', 'nosidebar' );
    	}
    	elseif ( $blog_type == 'Masonry' )
    	{
    		get_template_part( 'blog', 'masonry' );
    	}
    ?>
    
Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register