Mystile homepage blog post
-
Hi!
I am using Mystile theme by WooCommerce. I want to choose which one of my blog poststs will be displayed on my homepage. By default, it is the latest, however I want to have my first one pinned there.I assume I must change something in the index.php file of the Mystile theme, probably somewhere in this loop:
<?php /* Start the Loop */ ?> <?php while ( $the_query->have_posts() ) : $the_query->the_post(); $count++; ?> <?php /* Include the Post-Format-specific template for the content. * If you want to overload this in a child theme then include a file * called content-___.php (where ___ is the Post Format name) and that will be used instead. */ get_template_part( 'content', get_post_format() ); ?>
I am a beginner in PHP, so please help me to set the first blog post as the one featured on the homepage.
I want to use it for informative purposes on the homepage, so if someone else has this problem, I also recommend to change the last line:
get_template_part( 'content', get_post_format() );
to
the_content();
than you will get just the post content without the publication date or the author.Best wishes,
Greg
- The topic ‘Mystile homepage blog post’ is closed to new replies.