WordPress.org

Ready to get started?Download WordPress

Forums

New page and summary in home page (15 posts)

  1. klauzer
    Member
    Posted 3 years ago #

    How should I manage it. I want to create a new page. To this page I want to create a summary on the home page with a as "post". I s it some way to make it easier.

    Because right now I will do it like this.
    Create this new page. Then create the summary post on the homw page with a link to the "real" page.

    Is there some other ways?

  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Use a second Loop to pull that page's content into your home page?

    http://codex.wordpress.org/The_Loop#Multiple_Loops

  3. klauzer
    Member
    Posted 3 years ago #

    thanks.

    This can what I was looking for.
    Looks complicated but I will try.

  4. klauzer
    Member
    Posted 3 years ago #

    That was to much script for me.

    Is there no good plugin for that?
    There must be :-)

  5. klauzer
    Member
    Posted 3 years ago #

    Is there a plugin for that or not?
    Please I know there is but I can't find it.

    I only need a plugin that makes a short summary on the "home" page from a page that I created.

  6. klauzer
    Member
    Posted 3 years ago #

    I now created a new page. I want now to add a summary/teaser on my "home/first" page of my site. DO i need to create this manually? Or is there a plugin or feature that can make this summary show on the home page?

  7. fonglh
    Member
    Posted 3 years ago #

    why don't you just use posts instead of pages? Then show the excerpt instead of the full content when running the loop.

  8. klauzer
    Member
    Posted 3 years ago #

    I heard about loop. But I don't know what it is.

    To use this loop feature I need to know some programming?

  9. fonglh
    Member
    Posted 3 years ago #

    http://codex.wordpress.org/The_Loop
    http://codex.wordpress.org/Function_Reference/the_excerpt

    Edit the relevant file in your theme. It might be index.php or loop.php.

  10. klauzer
    Member
    Posted 3 years ago #

    Thanks for that fonglh.

    But this is totally out of my mind. I will never manage to make this change with codes.
    I am looking at this, but don't understand this att all.
    For example. A loop start here and ends here???????? Should I input this code or should I search for it to make some changes?

    Why isn't this already in WP as standard.

    Thanks anyway for trying to help me. But I will not go that deep, I know that I will make something wrong and make a real mess with my site.

  11. fonglh
    Member
    Posted 3 years ago #

    For example. A loop start here and ends here????????

    If you want to write a new one, you input the code. If you want to modify something, you search for it to make changes.

    Why isn't this already in WP as standard.

    It is, but you need a theme which supports it.

    You could try using a page template.
    http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

    1. Copy index.php from your theme and name it something like summary.php

    2. In summary.php, add a template name like it says on the codex page, then replace the_content() with the_excerpt()

    3. From the dashboard, create a new page, give it a title, leave the content field blank, and set the page template to the summary template you just created. There should be a drop down box for this. If not, it might be hidden under screen options on the top right.

    4. If your index.php file has no references to the_excerpt(), look for the get_template_part() function, which pulls code from another file. If so, copy that loop file and modify it instead. See the examples here.

    Since you always COPY the files, you won't make a mess of your site. If it goes wrong, just delete the copies you've made and remove the created page using the dashboard.

    If you're really worried, backup the site before starting.

  12. klauzer
    Member
    Posted 3 years ago #

    I have copied index.php and made a file summary.php in that file this is what I found. There where no the_content() or get_template_part()

    <?php
    /**
    * Front to the WordPress application. This file doesn't do anything, but loads
    * wp-blog-header.php which does and tells WordPress to load the theme.
    *
    * @package WordPress
    */

    /**
    * Tells WordPress to load the WordPress theme and output it.
    *
    * @var bool
    */
    define('WP_USE_THEMES', true);

    /** Loads the WordPress Environment and Template */
    require('./wp-blog-header.php');
    ?>

  13. fonglh
    Member
    Posted 3 years ago #

    not this one, the one in your themes folder.

    under wp-content/themes/<theme name>

  14. klauzer
    Member
    Posted 3 years ago #

    ok I found this.

    This is code is show on the top of summary.php

    <?php
     /* Mystique/digitalnature */
     get_header();
    ?>
      <!-- main content: primary + sidebar(s) -->
      <div id="main">
       <div id="main-inside" class="clearfix">
        <!-- primary content -->
        <div id="primary-content">
          <?php

    Should I now on the top add this to?

    <?php
    /*
    Template Name: Snarfer
    */
    ?>
  15. klauzer
    Member
    Posted 3 years ago #

    I am really bad on this. Can some one help me with this?

    What if I can send over a file that should be edited and someone that is good in this can make this change for me?

    I will in return give a add space on one of my sites that have about 10.000 visitors a day and almost all of them comes form US and Canada.

Topic Closed

This topic has been closed to new replies.

About this Topic