Support » Fixing WordPress » Posts in images inside categories

  • Hello all..
    i’been searching the forums for 2 days now for my problem and i havent got a solution yet.

    So my site is :
    I’ve used plugins post theming , easy recipe , getmecooking and many codes inside functions.php and content.php… but none of them did the work that i need.

    Ok i’ll give you A website example of how i need my posts to be listed inside my categories. See :

    They have their recipes only with their image and title and when u click the image or the title it redirects you to the post.
    But in my blog i have the posts ordered one posts under the other ..

    I want it to be like this ..
    Image1 Image3 Image5
    Image2 Image4 Image6
    Image7 Image8 Image9

    I’ve wasted so much time to find the solution but nothing happened.
    I guess i have to edit the functions.php or the content.php somehow..

    I Will love you forever if u help me..

Viewing 12 replies - 1 through 12 (of 12 total)
  • Write a new post, just put in the heading. Then upload the image, and just link the image to the full (new) post that is connected to that image.



    Forum Moderator

    ideally you should create and use a child theme of Twenty Eleven for your customisation – it is not recommnended to edit the default theme directly.

    is that idea for a specific category?

    – if yes – start with creating a category template:
    use a copy of category.php and save it under the appropriate category template name; then edit it.

    – if it is for all category archive pages, then edit category.php

    (if you do need post format specific output of the posts, this idea gets in my opinion too complicated for the forum to talk you through)
    otherwise, change this line in the category file:

    get_template_part( 'content', get_post_format() );


    get_template_part( 'content', 'category' );

    then create a content-category.php file from a copy of content.php;

    edit it and remove all unneeded output of titles, post meta, etc; so the left-over should look like:

    (the below is for the case that you are using ‘featured images’ for each post)

     * The template for displaying content category images
     * @subpackage Twenty_Eleven
    	<article id="post-<?php the_ID(); ?>" <?php post_class('image-grid'); ?>>
    		<div class="entry-content">
    			<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
    			<?php the_post_thumbnail(); ?>
    		</div><!-- .entry-content -->
    	</article><!-- #post-<?php the_ID(); ?> -->

    in the style.css, add (this is the basic css for the grid, and might need to be refined):

    .image-grid { float: left; width: 30%; margin-right: 3%; }
    .image-grid:nth-child(3n+0) { clear:left; }

    i did all ur steps .. Added the category-content , renamed the get template part in the content.php , add the lines in style.css …

    i dont see any difference.. Like nothing happened..

    my email is [email moderated – this forum does not provide support via email] if u want to help me

    It kinda worked.. But still the images are not like This !

    Image1 Image3 Image5
    Image2 Image4 Image6
    Image7 Image8 Image9

    why the first post shows By himself on the top?



    Forum Moderator

    change the second line of the new styles to:

    .image-grid:nth-child(3n+2) { clear:left; }

    or remove it.

    omg you are awesome!!!


    I dont want any help for now but if i”ll need some help in the future i’d like to have your email to contact you immediately..

    So if thats ok with you , just send a blank message at [email moderated] and i’ll have you there in case of emergency..

    Problem solved. Thnx to Alchmyth .



    Forum Moderator

    you are welcome 😉

    i forgot to ask…

    What if my posts fullfill the page?

    I mean i want to have 30 posts and then u will need to click to go to 2nd page , 3rd page , etc .. how do i do that?



    Forum Moderator

    I mean i want to have 30 posts and then u will need to click to go to 2nd page , 3rd page , etc .. how do i do that?

    the links should automatically appear below the images.

    ok i added a plugin wp-paging.. anyways thnx again!

    i’d really want to have ur email bro .. i’ll need some help!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Posts in images inside categories’ is closed to new replies.