Comments (4)
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.
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.
For me the solution was to add if ( is_front_page() )
to the page.php file.
from understrap.
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)
- Woocommerce Mini Cart Widget Stopped working with Understrap theme HOT 2
- Please provide a short summary of the problem (approx. 50 characters) HOT 6
- Theme contains outdated copies of Woocommerce template files HOT 5
- I can't figure out a way to make tagline appear in the header area. HOT 2
- RollupError: Unexpected character '@' HOT 4
- Potential typo in phpstan.neon.dist HOT 1
- Add IE Support for using bootstrap container classes in the block editor
- outdated woocommerce template files HOT 6
- The style.min.css file is not being linked to the page HOT 4
- npm run watch is not working HOT 13
- Feature Request: Add `.nvmrc` file with the needed version of node/npm HOT 3
- wordpress navbar toggle not working after log out HOT 4
- Accessing Bootstrap javascript constructors HOT 11
- Can we customize understrap_post_nav(); so it only gets prev/next from a specific category? HOT 18
- How to properly add additional js files HOT 1
- Release 1.2.4 Tracking Issue HOT 4
- Update to WPCS 3.0 (w/ PHP 8.2 support)
- Unable to build or run understrap projects - SyntaxError: Unexpected token '?' in file node_modules/lilconfig/src/index.js:161 HOT 1
- Optimize color palette generation for improved performance
- 5.3 Support HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from understrap.