WordPress.org

Ready to get started?Download WordPress

Forums

Posts in images inside categories (13 posts)

  1. xender
    Member
    Posted 1 year ago #

    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 : cookex.gr
    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 : funkycook.gr

    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..

  2. b1gft
    Member
    Posted 1 year ago #

    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.

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

    ideally you should create and use a child theme of Twenty Eleven for your customisation http://codex.wordpress.org/Child_Themes - 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: http://codex.wordpress.org/Category_Templates
    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() );

    to:

    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)

    <?php
    /**
     * 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(); ?>
    			</a>
    		</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; }
  4. xender
    Member
    Posted 1 year ago #

    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

  5. xender
    Member
    Posted 1 year ago #

  6. xender
    Member
    Posted 1 year ago #

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

    Image1 Image3 Image5
    Image2 Image4 Image6
    Image7 Image8 Image9

  7. xender
    Member
    Posted 1 year ago #

    why the first post shows By himself on the top?

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

    change the second line of the new styles to:

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

    or remove it.

  9. xender
    Member
    Posted 1 year ago #

    omg you are awesome!!!

    THNX A LOT!

    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 .

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

    you are welcome ;-)

  11. xender
    Member
    Posted 1 year ago #

    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?

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

    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.

  13. xender
    Member
    Posted 1 year ago #

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

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

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.