• Hi ! Many thanks for this beautiful theme. Very happy to find it ??

    I would like to create a static homepage based on your own homepage to meet my needs. But after creating a homepage.php file, I cannot manage to call the last 10 articles (except the first two always integrate in the slider).

    Besides, I’d like to add three links+image corresponding to my 3 sections on top of the footer. But I don’t know where to put it in the code (between the footer and the rightbar).

    To end, I would like to put the social buttons and the related posts we can see in the articles of your demo.

    Many thanks,
    Best regards,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hi @evallad,

    I hope you are well today and thank you for your question.

    To make it clear i want to ask you that whether you are trying to achieve the home page as following?

    https://colorlib.com/activello/

    Kind Regards,
    Movin

    Thread Starter evallad

    (@evallad)

    HI, I’m fine thank you. Hope you are too.
    Yes I was but I changed my mind.

    I keep the last articles page as homepage, desactivate the right bar and add my own code in the template to have my own elements. I would prefer to create a static homepage but impossible to get the articles loop (as shown in the https://colorlib.com/activello/ homepage).

    Besides,
    – I would like to hide from the homepage the articles shown in the slider. Is that possible ?
    – I’d like to have the share this & related saw in this page https://colorlib.com/activello/template-featured-image-vertical/

    Kind regards

    I am not sure what you meant by “the last articles page as homepage” so please make it a bit clear.

    Also share some screenshots and your site URL where you have made these changes so that i can better understand it and help you.

    I would like to hide from the homepage the articles shown in the slider. Is that possible ?

    You can try achieving this by using the following custom code as described here https://colorlib.com/wp/forums/topic/suppress-slider-on-posts-page/#post-24989

    function exclude_category( $query ) {
    	if( ! is_category() && get_theme_mod('activello_featured_hide') == 1 ){
    		$slidecat = get_theme_mod( 'activello_featured_cat' );
    
    	    if (  $query->is_main_query() ) {
    	        $query->set( 'cat', '-'.$slidecat );
    	    }
    	}
    }
    add_action( 'pre_get_posts', 'exclude_category' );
    Thread Starter evallad

    (@evallad)

    Many thanks for the code, it works perfectly!

    For the rest, I woukd like to create my own homepage. When I put this code in my homepage, thé page is empty:

    <div id="primary" class="content-area">
                    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
    
    		<main id="main" class="site-main <?php echo "page-".$paged;?>" role="main">
    
    		<?php if ( have_posts() ) : ?>
    
    			<div class="article-container">
    
    			<?php /* Start the Loop */ ?>
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', '' ); ?>
    
    			<?php endwhile; ?>
    
    			</div>
    
    			<?php activello_paging_nav(); ?>
    
    		<?php else : ?>
    
    			<?php get_template_part( 'content', 'none' ); ?>
    
    		<?php endif; ?>
    		</main><!-- #main -->
    	</div><!-- #primary -->

    I juste see the header, parts I’ve added and rhe slider.

    Hope it is clear now ??

    You are most welcome ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Static homepage creation’ is closed to new replies.