Giter Site home page Giter Site logo

Comments (4)

2pixels avatar 2pixels commented on May 22, 2024 1

Hi, I have the same issue with the hero slider. The hero widget doesn't appear on my static homepage.
Here is how you can fix it:
Copy these lines to page.php to the same place as index.php
if ( is_front_page() && is_home() ) : get_template_part( 'global-templates/hero' ); endif;

from understrap.

holger1411 avatar holger1411 commented on May 22, 2024

Hi!
The problem in your case might by line 17 in index.php (https://github.com/holger1411/understrap/blob/master/index.php#L17), which looks like:

if ( is_front_page() && is_home() ) {
It checks if it is the front page and the homepage.
The "is_front_page" checks if it is the blog page where all the articles will appear.
If you set a static page as homepage te slider will disappear, because it is still the homepage but not the front_page (in the WP terminology) anymore.
It was one of the coding standards requested by the WP Theme review team during the submission process for adding UnderStrap to the wordpress.org theme repository.

But you should be able to change it in your case just to:
if ( is_home() ){
Than the slider should appear even if the frontpage is a static page.

from understrap.

brevelles avatar brevelles commented on May 22, 2024

For me the solution was to add if ( is_front_page() ) to the page.php file.

from understrap.

dewolfe001 avatar dewolfe001 commented on May 22, 2024

Wow. This works like a charm! I keep tripping over aspects of the my work where I say, "I'm going to have to do a lot of coding and configurations..." -- only to find it's already built into Understrap.

from understrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.