WordPress.org

Ready to get started?Download WordPress

Forums

Make homepage and category view to look the equal (9 posts)

  1. polle001
    Member
    Posted 6 years ago #

    Hi, I have everything up and running, the thing is that in homepage, my posts looks perfect, with images and the css, but when I click a category, it displays the posts with no style and no images.

    Can someone please point me how can I make the category view look exactly as the homepage view ?

    Thanks.

  2. Doodlebee
    Member
    Posted 6 years ago #

    ...and the link would be...?

  3. wiziology
    Member
    Posted 6 years ago #

    yeah... it's kind of hard to help when you can't view what you have done.

  4. polle001
    Member
    Posted 6 years ago #

    You can see an example here:

    http://ensantander.com/santander displays images & styles and if you choose any of the categories from the right its just text.

    By the way, choose a category that has content, because if not it gives a 404 error, which also would be nice to know how to redirect to a emty category page or something instead an error.

    Thanks.

  5. wiziology
    Member
    Posted 6 years ago #

    Seems to me that the problem might be in your current theme. I cant view the actual PHP file to tell you if they are different in any way, however, if you go into your template editor user your current template (haha) and view the main index template and the archives, they should look similar.

  6. Doodlebee
    Member
    Posted 6 years ago #

    Well, when I choose a category that has content, I see the posts associated with those categories. I see no calls for images at all in the source code (and I do see a mysql error in the sidebar) You've also got quite a few validation errors on the categories page that could be contributing.

    As for the sidebar, your code should have "hide_empty=1" in the PHP call, to hide categories with no associated posts.

  7. polle001
    Member
    Posted 6 years ago #

    Thanks wiziology, the thing is that I dont want to mess with the code, they do look similar, but something is different there in the category file, I was hoping someone knows which part of the code make that, so I can modify directly in that code.

    doodlebee, its strange, the error in the sidebar sometimes happen, and sometimes dont, if you go there, see the error and then refresh, the error disappears, any idea in why ?

    And I know hidding the empty categories could be a solution, but I do want the visitors to see all the categories, no matter if they are empty, but having a 404 error when clicking them is really bad, is there a way to make empty categories not clickable ?

    Thanks to both.

    And if someone elsa has an idea what to modify so the categories show images and style, I'll apreciate it.

  8. moshu
    Member
    Posted 6 years ago #

    Probably, replace the_excerpt with the_content in the archive.php file.

  9. polle001
    Member
    Posted 6 years ago #

    Thanks moshy, that also made the trick, I actually replace some code I take from the index.php file, but changing what you said also make it possible, so if someone else has the same problem I just confirm it.

    My theme does not have an archive.php file, it has a category.php one, but now is working with images and style.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags