Support » Theme: PixiGo » Content

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Pixify

    (@pixify)

    @snippetfinance, there’s no such direct option to implement that, but can be achieved by doing some custom modifications in a child theme.

    Steps:

    1. Create a child theme following these steps: https://developer.wordpress.org/themes/advanced-topics/child-themes/#how-to-create-a-child-theme

    2. Create a new file in the child theme main folder called home.php and paste this exact code in it:

    <?php get_header(); ?>
    
    	<main id="primary" class="site-main">
    
    	<?php
    	if ( have_posts() ) :
    
    		wp_print_styles( array( 'wprig-content' ) );
    
    		/* Start the Loop */
    		while ( have_posts() ) :
    			the_post();
    
    			get_template_part( 'template-parts/content' );
    
    		endwhile;
    
    		the_posts_pagination(
    			array(
    				'mid_size'  => 2,
    			)
    		);
    
    	else :
    
    		get_template_part( 'template-parts/content', 'none' );
    
    	endif;
    	?>
    
    	</main><!-- #primary -->
    
    <?php
    get_sidebar();
    get_footer();

    Note: If something is changed in the home layout in future updates, you won’t be able to apply those changes because the child theme’s modifications overwrite the default theme code. Though, you can always deactivate the child theme to fallback to the default theme so not much of an issue.

    Thread Starter snippetfinance

    (@snippetfinance)

    Hi,

    I tried this but nothing loads in WordPress and I get the following:

    <?php get_header(); ?> <main id=”primary” class=”site-main”> <?php if ( have_posts() ) : wp_print_styles( array( ‘wprig-content’ ) ); /* Start the Loop */ while ( have_posts() ) : the_post(); get_template_part( ‘template-parts/content’ ); endwhile; the_posts_pagination( array( ‘mid_size’ => 2, ) ); else : get_template_part( ‘template-parts/content’, ‘none’ ); endif; ?> </main><!– #primary –> <?php get_sidebar(); get_footer();

    Theme Author Pixify

    (@pixify)

    @snippetfinance, probably an encoding issue from copying it from above.

    Copy the code from here – https://pastebin.com/dTZfgCCi

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Content’ is closed to new replies.