• Notice the post “Digital Politics Radio” on my category archive page:
    https://idonatepro.com/news/category/press/

    When you select that post, the formatting appears on the page for THAT post. But NONE of the formatting I used (with the HTML tab selected when I entered the content) is working on the category archive page. My HTML code is clean. I’m a web geek, so it’s not a matter of incorrect tags, etc.

    Why isn’t that formatting showing up on the archive page??

Viewing 5 replies - 1 through 5 (of 5 total)
  • More than likely, your category page is using the_excerpt() to output the excerpt rather than using the_content().

    the_excerpt() strips all HTML from the excerpted section; whereas the_content() shows the content the way you created it.

    Thread Starter Greg Smith

    (@elmnt)

    Thanks Curtiss… sounds so simple I should have seen it, haha. I will go in and look for that tag now, and make the edit.

    Thread Starter Greg Smith

    (@elmnt)

    OK, so I’m using twentyten, and in the category.php page, the line that’s grabbing the content (I’m assuming) is get_template_part( 'loop', 'category' );

    So I guess I’ll need to go into loop.php and grab a chunk of code that’s going to work for me, or edit one of the template files? What would you suggest?

    Create a new directory in your themes folder to hold a Twenty-Ten child theme (do not edit any of the Twenty-Ten source files directly, as they will be overwritten next time you update WordPress). You’ll need to create a new style.css file and place it in that new folder with just the header information in it (you can add more styles if you want, but it must have the header info – more information about that can be found in the link I provided).

    Then, create a new file called loop-category.php and upload it to the folder you just created. Inside of that new file, you should create a new loop like:

    if( have_posts() ) : while( have_posts() ) : the_post();
    /* Output your content here - copy from the appropriate part of loop.php if necessary */
    endwhile; endif;

    Then, activate your new child theme instead of using Twenty Ten. That should do it for you, I think.

    EDIT: Actually, I just realized that your theme has already been modified, so you should rename the folder in which your theme resides (name it something other than twentyten), then install a fresh copy of Twenty Ten. Then, modify the header info in your custom stylesheet so it shows that you’re using a custom theme instead of Twenty Ten. Then, just add the loop-category.php file I mentioned above. That way, next time you update WordPress, your custom theme won’t disappear. ??

    Thread Starter Greg Smith

    (@elmnt)

    Wow, okay. Thanks for that info. I’ve got some work to do. I’m starting to learn that twentyten changed the way I need to look at theme modification. I’ve got some brushing up to do this weekend. Thanks for your help!!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘HTML works on Post page, NOT on Category page’ is closed to new replies.