-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfront-page.php
More file actions
46 lines (35 loc) · 1.51 KB
/
front-page.php
File metadata and controls
46 lines (35 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
/**
* The front page template file
* Used for the homepage when "Front page displays" is set to "A static page"
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
// Check if Elementor is handling this page
if ( function_exists('elementor_theme_do_location') && elementor_theme_do_location('single') ) :
// Elementor is handling the page content
elementor_theme_do_location('single');
else :
// Show Elementor content if it exists, otherwise show fallback
?>
<div class="entry-content">
<?php
// This is crucial - Elementor injects content here
the_content();
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'modul8' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->
<?php endif; ?>
</article><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; // End of the loop. ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();