• Hi there,

    I am working on my own template, from scratch, and one feature I really would like to use, is that drop-down menu at:

    Appearance/ Customize / Homepage Settings /

    Homepage:
    + Add New Page

    This, because my landing page exists out of multiple pages. I have found a work around but this means I need to manipulate the robots.txt and htaccess cos search engines otherwise will show these pages as individual pages and not as a part of the entire landing page as a whole.

    I think I am missing some code in the functions.php and/or maybe in my landing page php file.

    Anyways, I could really use a bit of help, tips or advice.

    Thank you and take care ??

    • This topic was modified 2 years, 9 months ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Everything else WordPress topic
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey,

    Sorry, I’m not entirely sure what it is you’re trying to do?

    You say the New page button doesn’t work in the menu editor, what happens when you click it? It should publish the new page and add it to your menu at the same time.

    > This, because my landing page exists out of multiple pages.

    Do you mean that you want to create a single page that is split in to multiple sections, and that only one section should be visible at a time? Kind of like a slideshow of content? I don’t think there’s a core block that does this, but there are many plugins you might try ??

    Thread Starter RayR75

    (@rayr75)

    Hey James,

    When I click it, it does not give me the option to select a page. I guess it might be because it’s not “supported” with the Theme, since it’s my own.

    What I have now, is my landing page set up like so:

    <!-- Page Section 1 -->
    <?php $recent = new WP_Query("page_id=1"); while($recent->have_posts()) : $recent->the_post();?>
      <section id="<?php echo $post->post_name; ?>" <?php post_class($post->post_name); ?>>
        <div class="container">
            <?php the_content();?>
        </div>
      </section>
    <?php endwhile; ?>
    
    <!-- Page Section 2 -->
    <?php $recent = new WP_Query("page_id=2"); while($recent->have_posts()) : $recent->the_post();?>
      <section id="<?php echo $post->post_name; ?>" <?php post_class($post->post_name); ?>>
        <div class="container">
            <?php the_content();?>
        </div>
      </section>
    <?php endwhile; ?>

    ETC ETC ETC

    It works, it just that when I throw this live, Google see these sections as separate pages and when people click on Google’s links, they do not end up on the landing page, but the individual page. For this I have to manipulate it through HTACCESS and robots.txt

    I hope, and assume, that when I would use that dropdown page selector, this issue might not occur. Assuming WordPress has a standard process for this which is normally in their template.I guess, not sure.

    Hope you get what I mean. It’s tough to explain, especially when English is not my first language ??

    • This reply was modified 2 years, 9 months ago by RayR75.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘“+ Add New Page” not working with my own template.’ is closed to new replies.