theme development - Template for landing pages

I'm using WP for a business site (not a blog) with landing pages. So there are no posts, only pages (actually, &quo

I'm using WP for a business site (not a blog) with landing pages. So there are no posts, only pages (actually, "landing pages") which I create with the Elementor page builder.

Since a typical theme has lots of unnecessary stuff for a landing page business site, I decided to create a lightweiht custom theme. I have a header.php, footer.php and basic css/js enqueued via functions.php. I want to create each page's content using a page builder.

I don't know what to put in index.php. This is something typical:

<?php get_header(); ?>

// ....the wp loop goes here

<?php get_footer(); ?>

Of course in my case there is no loop - but that is where the main content goes. When I create a new page with Elementor (or other page builder, or Gutenberg), I want my custom per-page content to go in there, where the loop usually goes.

What markup do I place there, so the page builder knows where to insert each page's content?

I'm using WP for a business site (not a blog) with landing pages. So there are no posts, only pages (actually, "landing pages") which I create with the Elementor page builder.

Since a typical theme has lots of unnecessary stuff for a landing page business site, I decided to create a lightweiht custom theme. I have a header.php, footer.php and basic css/js enqueued via functions.php. I want to create each page's content using a page builder.

I don't know what to put in index.php. This is something typical:

<?php get_header(); ?>

// ....the wp loop goes here

<?php get_footer(); ?>

Of course in my case there is no loop - but that is where the main content goes. When I create a new page with Elementor (or other page builder, or Gutenberg), I want my custom per-page content to go in there, where the loop usually goes.

What markup do I place there, so the page builder knows where to insert each page's content?

Share Improve this question asked Dec 7, 2019 at 12:18 lonixlonix 3011 silver badge10 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 2

in your theme folder. create a new php file.

For example call it: landingpage.php

in the php file you could have something as basic as:

<?php
/*
Template Name: Landing Page
*/
get_header();

while ( have_posts() ) : the_post();

 the_content();

endwhile;   

get_footer();

?>

Elementor will be called / inserted where it says the_content();

Included out of the box with elementor you should have a blank elementor template to choose from and using the built in elementor theme builder options create exactly what you are after also choosing conditions of when that page template gets used?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744930481a4601704.html

相关推荐

  • theme development - Template for landing pages

    I'm using WP for a business site (not a blog) with landing pages. So there are no posts, only pages (actually, &quo

    1天前
    30

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信