Siobhan Bamber (siobhyb) on "[Theme: Pictorico] Static home page with featured posts slider"

ساخت وبلاگ

Hi there,

Surya Panda is right that the theme doesn't display the slider on a static front page by default. However, you can get the slider to display on a static front page if you're willing to experiment a little with the theme's code.

The first step is for you to set up a child theme.

In case you're unsure, the following guides provide a good introduction to child themes, including steps to set one up:

After you have completed that step, copy the parent's header.php file to your child theme's directory and then open it in your favourite text/code editor.

Locate the following code in that file:

<?php if ( is_home() && pictorico_has_featured_posts( 1 ) ) : ?>

The is_home() conditional tag tells the theme to display the slider when you have your home page set to display your site's latest posts:

https://codex.wordpress.org/Conditional_Tags#The_Main_Page

The is_front_page() conditional tag can be used in cases where you want to display something on your site's front page, regardless of whether the front page is set to show posts or static content.

Switching the is_home() tag with is_front_page() in your child theme would therefore get the slider to display on your static front page:

<?php if ( is_front_page() && pictorico_has_featured_posts( 1 ) ) : ?>

Let me know if you decide to go through the above steps and if any questions come up along the way.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 390 تاريخ : پنجشنبه 4 شهريور 1395 ساعت: 19:10