WordPress.org

Ready to get started?Download WordPress

Forums

How to make a page of thumbnail images for category page (14 posts)

  1. rileybetka
    Member
    Posted 1 year ago #

    Hello - I am trying to make it so that my category page for Photos shows posts as a clickable thumbnail image that will go to that post. I have created a template file using the following code which I found online and rather than getting a grid of thumbnails, I am now getting a list of text with no picture at all - can anyone look at this and tell me what I am doing wrong? Thanks in advance for the help!

    [broken code moderated - please re-post the code and make sure to mark it according to the forum guidelines to keep it intact - http://codex.wordpress.org/Forum_Welcome#Posting_Code ]

  2. rileybetka
    Member
    Posted 1 year ago #

  3. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    your code was not usable because it was posted without being marked properly as code.

    please post the code again - http://codex.wordpress.org/Forum_Welcome#Posting_Code

  4. rileybetka
    Member
    Posted 1 year ago #

  5. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    rather than getting a grid of thumbnails, I am now getting a list of text with no picture at all

    the code seems to be ok; checked in a test setup with a child theme of Twenty Twelve.

    are you using the css from the article? (you might need to adapt that to suit your theme).

    do all your posts have the 'featured image' aka post thumbnail?

    http://codex.wordpress.org/Post_Thumbnails

    can your result be viewed live ?

  6. rileybetka
    Member
    Posted 1 year ago #

    I had not set a featured image - that seems to have fixed it - but the thumbnail is huge - where do I change the thumbnail size setting? Thank you!

    URL: http://www.daily-mash.com/wordpress2/category/photos/

  7. rileybetka
    Member
    Posted 1 year ago #

    They aren't actually showing up as thumbnails - it is displaying the image full-sized...

  8. rileybetka
    Member
    Posted 1 year ago #

    I guess there is some css along with it that looks like it defines the thumbnail size - I don't know how to incorporate this css with this template though - do I make the file name of the css match the file name of the php (ie thumbnails.php and thumbnails.css)??

  9. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    you can add a thumbnail size directly in the the_post_thumbnail() code (in line 25 of the pastebin);

    http://codex.wordpress.org/Function_Reference/the_post_thumbnail

    there is more info in the Codex chapter I linked earlier.

  10. rileybetka
    Member
    Posted 1 year ago #

    do you know how I can incorporate the css on that page with the template file? I have uploaded it in the childtheme folder I have set up but I don't know how to make that page load the css file.
    if you look at this page he has included css but I just need to know how to make it work with my page

    http://matthiaspabst.de/wordpress-thumbnailseite-mit-artikelbildern/

  11. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    as these are all specific styles, you could just add them to the end of style.css in your child theme.

  12. rileybetka
    Member
    Posted 1 year ago #

    That's what I thought so I tried it and it's not doing anything...
    http://pastebin.com/9m4zCxde

  13. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    whatever text editor you might have used to paste the css into the stylesheet, has totally altered the code;

    it should look like:

    /* Post Thumbnail Grid */
    .gridcontainer h2 a{color: #333; font-size: 13px;}
    .gridcontainer .griditemleft{float: left; width: 150px; margin: 0 30px 20px 0;}
    .gridcontainer .griditemright{float: left; width: 150px;}
    .gridcontainer .postimage{margin: 0 0 5px 0;}
    .gridcontainer .postimage-title {text-align: center;}
  14. rileybetka
    Member
    Posted 1 year ago #

    I take that back...it has added thumbnails to the posts on my main page

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.