Include multiple pages on frontpage Wordpress Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Data science time! April 2019 and salary with experience Should we burninate the [wrap] tag? The Ask Question Wizard is Live!Link to Wordpress 'latest posts' page when using static front pageDifference between require, include, require_once and include_once?How to add a PHP page to WordPress?Why does my blog page only show one post?Wordpress - Custom Blog PageUsing multiple blog pages in a wordpress websiteWhy PHP include is working on local server and not on websiteWordpress how to use both index and home.phpMultiple Blog Layouts in WordpressWordpress blog separate from main (html) page; how do I include Wordpress functions?

How does the particle を relate to the verb 行く in the structure「A を + B に行く」?

Short Story with Cinderella as a Voo-doo Witch

How to call a function with default parameter through a pointer to function that is the return of another function?

Seeking colloquialism for “just because”

Using et al. for a last / senior author rather than for a first author

English words in a non-english sci-fi novel

What does this icon in iOS Stardew Valley mean?

How to tell that you are a giant?

Storing hydrofluoric acid before the invention of plastics

How do I stop a creek from eroding my steep embankment?

Dating a Former Employee

What to do with chalk when deepwater soloing?

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

Extract all GPU name, model and GPU ram

Generate an RGB colour grid

What does the "x" in "x86" represent?

List of Python versions

Apollo command module space walk?

The logistics of corpse disposal

Fundamental Solution of the Pell Equation

Why are there no cargo aircraft with "flying wing" design?

Why was the term "discrete" used in discrete logarithm?

Is it true that "carbohydrates are of no use for the basal metabolic need"?

What causes the vertical darker bands in my photo?



Include multiple pages on frontpage Wordpress



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Data science time! April 2019 and salary with experience
Should we burninate the [wrap] tag?
The Ask Question Wizard is Live!Link to Wordpress 'latest posts' page when using static front pageDifference between require, include, require_once and include_once?How to add a PHP page to WordPress?Why does my blog page only show one post?Wordpress - Custom Blog PageUsing multiple blog pages in a wordpress websiteWhy PHP include is working on local server and not on websiteWordpress how to use both index and home.phpMultiple Blog Layouts in WordpressWordpress blog separate from main (html) page; how do I include Wordpress functions?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















I've got (probably) a silly question. I want to create a single-page website on Wordpress.
I would like to achieve somthing equivalent to PHP code like this:



<body>
<div id="home">
<?php include 'home.php';?>
</div>

<div id="about-us">
<?php include 'about-us.php';?>
</div>
</body>


What I want is to include posts/pages with specific IDs created in the backend of Wordpress.



How can I achieve this using the Loop? Or there's another way to do this? I want to print pages as well as blog posts.










share|improve this question






























    0















    I've got (probably) a silly question. I want to create a single-page website on Wordpress.
    I would like to achieve somthing equivalent to PHP code like this:



    <body>
    <div id="home">
    <?php include 'home.php';?>
    </div>

    <div id="about-us">
    <?php include 'about-us.php';?>
    </div>
    </body>


    What I want is to include posts/pages with specific IDs created in the backend of Wordpress.



    How can I achieve this using the Loop? Or there's another way to do this? I want to print pages as well as blog posts.










    share|improve this question


























      0












      0








      0








      I've got (probably) a silly question. I want to create a single-page website on Wordpress.
      I would like to achieve somthing equivalent to PHP code like this:



      <body>
      <div id="home">
      <?php include 'home.php';?>
      </div>

      <div id="about-us">
      <?php include 'about-us.php';?>
      </div>
      </body>


      What I want is to include posts/pages with specific IDs created in the backend of Wordpress.



      How can I achieve this using the Loop? Or there's another way to do this? I want to print pages as well as blog posts.










      share|improve this question
















      I've got (probably) a silly question. I want to create a single-page website on Wordpress.
      I would like to achieve somthing equivalent to PHP code like this:



      <body>
      <div id="home">
      <?php include 'home.php';?>
      </div>

      <div id="about-us">
      <?php include 'about-us.php';?>
      </div>
      </body>


      What I want is to include posts/pages with specific IDs created in the backend of Wordpress.



      How can I achieve this using the Loop? Or there's another way to do this? I want to print pages as well as blog posts.







      php wordpress loops templates






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 at 17:19







      AdamsRX

















      asked Mar 8 at 17:11









      AdamsRXAdamsRX

      185




      185






















          1 Answer
          1






          active

          oldest

          votes


















          0














          If you can include any file in the theme folder using



          require_once get_template_directory() . '/inc/plugable/tiny-mce/buttons.php';


          But it will not be logical. It would be more appropriate to use a loop. there you choose the type of post ( post, page etc. ). here example






           <?php
          // Define the query
          $args = array(
          'post_type' => 'post',
          'posts_per_page' => -1,
          );
          $query = new WP_Query( $args );

          while ( $query->have_posts() ) : $query->the_post(); ?>

          <div class="col-md-4">
          <article title="<?php the_title(); ?>" class="card">
          <a class="" href="<?php the_title(); ?>">
          <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
          <div class="up-2">
          <h3 class="card__title"><?php the_title(); ?></h3>
          </div>
          </a>
          </article>
          </div>

          <?php endwhile;
          wp_reset_postdata() ?>





          post types



          wp query






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function ()
            StackExchange.using("externalEditor", function ()
            StackExchange.using("snippets", function ()
            StackExchange.snippets.init();
            );
            );
            , "code-snippets");

            StackExchange.ready(function()
            var channelOptions =
            tags: "".split(" "),
            id: "1"
            ;
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function()
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled)
            StackExchange.using("snippets", function()
            createEditor();
            );

            else
            createEditor();

            );

            function createEditor()
            StackExchange.prepareEditor(
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader:
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            ,
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            );



            );













            draft saved

            draft discarded


















            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55067914%2finclude-multiple-pages-on-frontpage-wordpress%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            If you can include any file in the theme folder using



            require_once get_template_directory() . '/inc/plugable/tiny-mce/buttons.php';


            But it will not be logical. It would be more appropriate to use a loop. there you choose the type of post ( post, page etc. ). here example






             <?php
            // Define the query
            $args = array(
            'post_type' => 'post',
            'posts_per_page' => -1,
            );
            $query = new WP_Query( $args );

            while ( $query->have_posts() ) : $query->the_post(); ?>

            <div class="col-md-4">
            <article title="<?php the_title(); ?>" class="card">
            <a class="" href="<?php the_title(); ?>">
            <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
            <div class="up-2">
            <h3 class="card__title"><?php the_title(); ?></h3>
            </div>
            </a>
            </article>
            </div>

            <?php endwhile;
            wp_reset_postdata() ?>





            post types



            wp query






            share|improve this answer



























              0














              If you can include any file in the theme folder using



              require_once get_template_directory() . '/inc/plugable/tiny-mce/buttons.php';


              But it will not be logical. It would be more appropriate to use a loop. there you choose the type of post ( post, page etc. ). here example






               <?php
              // Define the query
              $args = array(
              'post_type' => 'post',
              'posts_per_page' => -1,
              );
              $query = new WP_Query( $args );

              while ( $query->have_posts() ) : $query->the_post(); ?>

              <div class="col-md-4">
              <article title="<?php the_title(); ?>" class="card">
              <a class="" href="<?php the_title(); ?>">
              <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
              <div class="up-2">
              <h3 class="card__title"><?php the_title(); ?></h3>
              </div>
              </a>
              </article>
              </div>

              <?php endwhile;
              wp_reset_postdata() ?>





              post types



              wp query






              share|improve this answer

























                0












                0








                0







                If you can include any file in the theme folder using



                require_once get_template_directory() . '/inc/plugable/tiny-mce/buttons.php';


                But it will not be logical. It would be more appropriate to use a loop. there you choose the type of post ( post, page etc. ). here example






                 <?php
                // Define the query
                $args = array(
                'post_type' => 'post',
                'posts_per_page' => -1,
                );
                $query = new WP_Query( $args );

                while ( $query->have_posts() ) : $query->the_post(); ?>

                <div class="col-md-4">
                <article title="<?php the_title(); ?>" class="card">
                <a class="" href="<?php the_title(); ?>">
                <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
                <div class="up-2">
                <h3 class="card__title"><?php the_title(); ?></h3>
                </div>
                </a>
                </article>
                </div>

                <?php endwhile;
                wp_reset_postdata() ?>





                post types



                wp query






                share|improve this answer













                If you can include any file in the theme folder using



                require_once get_template_directory() . '/inc/plugable/tiny-mce/buttons.php';


                But it will not be logical. It would be more appropriate to use a loop. there you choose the type of post ( post, page etc. ). here example






                 <?php
                // Define the query
                $args = array(
                'post_type' => 'post',
                'posts_per_page' => -1,
                );
                $query = new WP_Query( $args );

                while ( $query->have_posts() ) : $query->the_post(); ?>

                <div class="col-md-4">
                <article title="<?php the_title(); ?>" class="card">
                <a class="" href="<?php the_title(); ?>">
                <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
                <div class="up-2">
                <h3 class="card__title"><?php the_title(); ?></h3>
                </div>
                </a>
                </article>
                </div>

                <?php endwhile;
                wp_reset_postdata() ?>





                post types



                wp query






                 <?php
                // Define the query
                $args = array(
                'post_type' => 'post',
                'posts_per_page' => -1,
                );
                $query = new WP_Query( $args );

                while ( $query->have_posts() ) : $query->the_post(); ?>

                <div class="col-md-4">
                <article title="<?php the_title(); ?>" class="card">
                <a class="" href="<?php the_title(); ?>">
                <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
                <div class="up-2">
                <h3 class="card__title"><?php the_title(); ?></h3>
                </div>
                </a>
                </article>
                </div>

                <?php endwhile;
                wp_reset_postdata() ?>





                 <?php
                // Define the query
                $args = array(
                'post_type' => 'post',
                'posts_per_page' => -1,
                );
                $query = new WP_Query( $args );

                while ( $query->have_posts() ) : $query->the_post(); ?>

                <div class="col-md-4">
                <article title="<?php the_title(); ?>" class="card">
                <a class="" href="<?php the_title(); ?>">
                <img class="card__img" alt="<?php the_title(); ?>" src="<?php echo get_the_post_thumbnail_url(); ?>">
                <div class="up-2">
                <h3 class="card__title"><?php the_title(); ?></h3>
                </div>
                </a>
                </article>
                </div>

                <?php endwhile;
                wp_reset_postdata() ?>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Mar 9 at 16:36









                HermanHerman

                87




                87





























                    draft saved

                    draft discarded
















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid


                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.

                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function ()
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55067914%2finclude-multiple-pages-on-frontpage-wordpress%23new-answer', 'question_page');

                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    AWS Lex not identifying response if by a variable The 2019 Stack Overflow Developer Survey Results Are In Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) The Ask Question Wizard is Live! Data science time! April 2019 and salary with experienceEnforcing custom enumeration in AWS LEX for slot valuesHow to give response based on user response in Amazon Lex?Intercepting AWS Lambda Response to a AWS Lex QueryLex chat bot error: Reached second execution of fulfillment lambda on the same utteranceamazon lex showing invalid responseLambda response send back to Lex slot?Response card in Amazon lexAmazon Lex - Lambda response return HTML to botHow can I solve 424 (Failed Dependency) (python) obtained from Amazon lex?

                    Алба-Юлія

                    Захаров Федір Захарович