WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to change "Archive" page template? (40 posts)

  1. Olivia
    Member
    Posted 10 months ago #

    Hello,

    I would like my Archive page to show ONLY
    the titles of the post's, beginning paragraph, and a [Read more . . ] link to the full page.

    Currently it is showing full articles on the Archive page.

    http://olivetjournal.com/2013/06

    I am a newbie. I have searched for help articles but I don't understand them. How can I find Archive page on my editor? It is not listed as "Page" or "Post." I do not know how to edit CSS Codes. I need a step-by-step instruction or a plugin that does that.

    Thank you!

  2. Olivia
    Member
    Posted 10 months ago #

    Any boy there?

    Can anyone at least tell me where I can find the Archive page template?

    I know where the Editor is, but don't see "Archive page" listed there. I don't want tot change the template of all the pages . . .

    Thanks!

  3. Have some patience, it's only been an hour since you've posted. Please don't bump either.

    That Archive Page is a template that comes some themes. If you don't see one then your theme doesn't have that template.

    You can try creating your own template with some PHP coding. An example is at this Codex page.

    http://codex.wordpress.org/Page_Templates#Archives_with_Content

    If you do create your own template then you'll want to first create a child theme of the theme you are using.

    http://codex.wordpress.org/Child_Themes

    That way if an update comes out for your theme then you will not lose your Archives page template. Your template will be safe in the child theme's directory.

  4. Jose Castaneda
    Member
    Posted 10 months ago #

    You won't find "Archives" in your editor if you mean what I think you mean. The way WordPress handles the presentation of posts/pages is through PHP files, which funny enough are called Template files. The theme you are using does not appear to have a archive.php file.

    As Jan provided some links for you to read, I highly recommend you read the second one about Child Themes. You will then need to create an archive.php file and use some template tags to get the right output you want to achieve and then style using CSS.

  5. Olivia
    Member
    Posted 10 months ago #

    Thank you both!

    So, here are what I understand from your replies:

    1. It seems there is no Archive template with the theme I am using.
    2. I can create a template with some PHP coding.
    3. If I choose to do so, creating a child theme is recommended.

    I have looked at those links. Thank you.

    Now, this is my first Web publishing I have ever tried. I have no idea how PHP codes work yet. I may be able to create a template file according to the example, but I don't know what to do with it, or where I should copy it to. It will take some time for me to learn all that I need and do what is recommended to do, it looks like. . . . . . that is where I am at.

    Is there any plugin that might help me with it?

    If not, I will have to wait until my skill is up to it.

  6. Olivia
    Member
    Posted 10 months ago #

    But, if there is no Archive page template, where is the Archive page coming from anyway . . ??? Just wondering. I don't see it in "Page" or "Post" sections.

  7. Jose Castaneda
    Member
    Posted 10 months ago #

    The template that is being used is the index.php file. It is the way the Template hierarchy works within WordPress.

    What you would do is create a child theme, add the file archive.php to the child theme's folder and style using CSS.

  8. Olivia
    Member
    Posted 10 months ago #

    Thank you Jose for sticking with me.

    But,

    What you would do is create a child theme, add the file archive.php to the child theme's folder and style using CSS.

    I have no idea how to do all this.

    Creating a child theme part, may be I can do by using examples. But, the examples in the codex instructions have screen shots from older versions that I am not familiar with, so I cannot figure it out. I just don't know add the created file to "where" and "how." Where can I find index.php?

    Sorry, I know it must be frustrating to people who are so advanced. As I said in the beginning, I have been doing this only for a couple for weeks.

  9. Olivia
    Member
    Posted 10 months ago #

    OK, I found the index.php.

    Now, where can I find "child theme" folder, or how can I create it?

  10. Olivia
    Member
    Posted 10 months ago #

    I will get more help from the developer of the Theme.

    Thank you all!

  11. Jose Castaneda
    Member
    Posted 10 months ago #

    You create the folder using an FTP program or your host's file management system.

    Have to run but I'll be back later to further post. :)

  12. Olivia
    Member
    Posted 10 months ago #

    OMG! You are such a blessing, Jose!

    Sure, take your time!

    Thanks!

  13. Jose Castaneda
    Member
    Posted 10 months ago #

    So what you want to do is have two different programs open: 1 A text editor, preferably Notepad so it will have the proper file extension and 2 an FTP program or equivalent.

    Method 1 ( Simply add a new file ) :
    In Notepad add the provided code and save it as archives.php.

    Upload to your theme's folder and you're done.

    Method 2 ( Child theme ) :
    Create an empty folder that will house our files.

    If you haven't already create your stylesheet with the proper heading so WordPress know it is a child theme we are dealing with.

    Create that same file with the provided code and save it as archives.php in your child theme folder.

    Upload the folder to your /wp-content/themes/ directory and activate the newly created child theme.

  14. Olivia
    Member
    Posted 10 months ago #

    Wow! Very comprehensive. And you created the stylesheet for me?

    Thank you, Jose!!!

    Now, it looks like I may be able to follow the steps and go somewhere. With your instructions, and some more patience on my part, I am sure I can do it.

    If I get stuck, I will post a separate question again.

    Thanks again!

  15. Olivia
    Member
    Posted 10 months ago #

    OK . . .

    I have created a directory "wp-content/theme/my-life-child" with the GoDaddy FTP file manager. And, added the following part to the codes you provided for me, according to the instruction on http://codex.wordpress.org/Child_Themes

    /*
    Theme Name:     My Life Child
    Theme URI:      http://themehybrid.com/themes/my-life
    Description:    Child archive template for the My Life theme
    Author:         Olivia
    Author URI:     http://olivetjournal.com
    Template:       mylife
    Version:        0.3
    */
    
    @import url("../my-life/style.css");

    So, where can I upload it? and How?

    I tried to upload it through FTP File Manager, but it says "Missing PlugIn." I was told by GoDaddy tech that it should be done through WP.

    Do I do that through CSS Stylesheet Editor?

    Thanks!

  16. Olivia
    Member
    Posted 10 months ago #

    I got the archive.php with the above headers uploaded to "wp-content/theme/my-life-child".

    And, this is what I see on the Theme page:

    Broken Themes

    The following themes are installed but incomplete. Themes must have a stylesheet and a template.

    Name Description
    my-life-child Stylesheet is missing.

    What's next?

    Thanks.

  17. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    Try reviewing child themes.

  18. Olivia
    Member
    Posted 10 months ago #

    Thank you esmi.

    I have gone through that page about 7-8 times, and have done everything "I could understand" and "could do safely." See. . . . I am a newbie with WP and Web-publishing in general. I just don't understand the language. I don't even know what "stylesheet" means.

    All I wanted to do was to change the look of the archive page.

    Do you have any other suggestions that I may be able to try?

  19. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    In the child theme directory, create a file called style.css. This is the only file required to make a child theme.

    http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme

  20. Olivia
    Member
    Posted 10 months ago #

    Sorry . . . Very sorry.

    I still do not understand.

    I have a file called "archive.php" with the heading I copied above, which I created according to "Child Theme" instruction you gave me.

    Do you mean I just need to write "style.css" somewhere?

    Do I need to create another file? Then, with what?

    I am about ot give up.

  21. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    You need to read the page linked to above properly.

  22. Olivia
    Member
    Posted 10 months ago #

    I just don't have the basic knowledge to understand it properly. Lik I said, I went through it multiple times.

    I did what I understood it said.

    Please tell me what part of the heading is wrong and what do I need to add to make it a style.css. I added the last line as the instruction says. Do I need to put it first? It says style.css there.

    /*
    Theme Name:     My Life Child
    Theme URI:      http://themehybrid.com/themes/my-life
    Description:    Child archive template for the My Life theme
    Author:         Olivia
    Author URI:     http://olivetjournal.com
    Template:       mylife
    Version:        0.3
    */
    
    @import url("../my-life/style.css");
  23. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    And you uploaded this file to...?

  24. Olivia
    Member
    Posted 10 months ago #

    I add this to the top of this file you can see here: http://pastebin.com/Jc0g2hRq

    named it, "archive.php" and uploaded it to wp-content/theme/my-life-child according to Jose's suggestion above.

  25. Olivia
    Member
    Posted 10 months ago #

    I just want the list of posts on my archive page to be with "Title" "First few sentences" and "Red more . . ." instead of listing entire post contents.

  26. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    I add this to the top of this file

    No. That should be a separate style.css file in the child theme's folder.

  27. Olivia
    Member
    Posted 10 months ago #

    OK . . .

    I will try that. Please give me a few minutes.

  28. Olivia
    Member
    Posted 10 months ago #

    I am working on it, but how this will make the change on the archive page as I want?

  29. esmi
    Theme Diva & Forum Moderator
    Posted 10 months ago #

    Let's just focus on getting your child theme working & active first.

  30. Olivia
    Member
    Posted 10 months ago #

    Right.

    I uploaded the above Child Theme part s "style.css" and the rest, "archive.php" to wp-content/theme/my-life-child.

    Went to admin, then to Mange Theme. Now it says under [Child Theme]:

    The parent theme is missing. Please install the "mylife" parent theme.

    So, which file am I supposed to copy and upload?

Reply »

You must log in to post.

About this Topic