简体   繁体   中英

Custom Page Templates Not Displaying In Dropdown

I'm working on a One-Page custom Wordpress theme him having some problem in the Backend of the WordPress. When every I make a Custom Page Template in my directory does not show up in dropdown I have added everything and save everything right insides the code.

This how him loading all the custom pages, header, and footer to load on front-page.

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">

            <?php while (have_posts()) : the_post(); ?>
                <?php get_template_part('templates/page', 'header'); ?>
                <?php get_template_part('templates/modules/content', 'page-about'); ?>
                <?php get_template_part('templates/modules/content', 'page-services'); ?>
                <?php get_template_part('templates/modules/content', 'page-photography'); ?>
                <?php get_template_part('templates/modules/content', 'page-portfolio'); ?>
                <?php get_template_part('templates/modules/content', 'page-contact'); ?>
                <?php get_template_part('templates/page', 'footer'); ?>
            <?php endwhile; ?>

    </main><!-- #main -->
</div><!-- #primary -->

Here are some screenshot of directory of custom pages that trying to load inside my dropdown template.

you are making one page theme and you created some templates but i can see in screenshot that you are calling all templates under home page so there is already header and footer included then why you are adding header and footer to all the other templates?

on one page theme you just don't need to include header and footer to every template

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM