WordPress.org

Ready to get started?Download WordPress

Forums

MesoColumn
[resolved] categories in fist page (8 posts)

  1. jsirris
    Member
    Posted 1 month ago #

    Hi, thank you for this wonderfull theme.
    I will describe wahat I want to do and if anyone can help me, please do.
    In first page there are 4 featured categories. As theme is set up, first page shows the most recent post of each one category (number of post set to 1)
    I want to have a fix description and image for each categoty (categoty description maybe???) which will be shown at fisrt page, and when clicking on it you will be redirected to the blog post of that category.

    You can see the current webpage that displays the first opst of each category
    http://1lyk-chiou.chi.sch.gr/site/

    Please advice

    Kind Regards
    John

  2. Richie KS
    Member
    Theme Author

    Posted 1 month ago #

    this one a bit tricky, first add this to theme option->custom css

    #custom .feat-post .feat-meta,#custom .feat-post .feat-content { display:none; }

    open lib/templates/feat-cat-meta-top.php and add this code in line 6

    <?php
    $cat_value = dez_get_singular_cat('false');
    $thecatid = get_cat_ID($cat_value);
    if($thecatid) {
    echo '<div class="entry-content feat-content">' . category_description( $thecatid ) . '</div>';
    }
    ?>

    haven't test them tho..

  3. jsirris
    Member
    Posted 1 month ago #

    Thank you for your help Richie.
    The css code hides the display of the post body. It stil show post's featured phote and post's title.

    The php code didn't succeed to show category description.

    I have also installed "category images" plugin in order to assign a feature image to each category. I am trying to display on front page the category's featured image with this code
    <?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url(); ?>
    with no success too.

    Thanks for your help
    Kind regards
    John

  4. jsirris
    Member
    Posted 1 month ago #

    I have changed css to this and now no post is displayed.
    #custom .feat-post .feat-meta,#custom .feat-post { display:none; }
    #custom .feat-post .feat-meta,#custom .feat-content { display:none; }

    Stil haven't managed to display category description and category image.

  5. jsirris
    Member
    Posted 1 month ago #

    Hi Richie,
    it seems there is a conflict between added css code and the added code on feat-cat-meta-top.php.

    When I comment out css code, category description is shown along with the 1st post of the category.

    When added css code is activated then nothing is shown (nor post nor descrition)

    I may have not added the code at line 6 of the php file. I have added it just above the getmodtime parameter line.

    Kind regards
    John

  6. jsirris
    Member
    Posted 1 month ago #

    Well, I have managed to do it but I can't imagine what I have done to the code...

    this is a part the feat-cat-meta-top.php file. Most of the post details at the beggining of the file is commented out. I have added these lines:

    <?php
    $cat_value = dez_get_singular_cat('false');
    $thecatid = get_cat_ID($cat_value);
    ?>
    <img src="<?php if (function_exists('z_taxonomy_image_url')) echo z_taxonomy_image_url($thecatid); ?>" />
    
    <?php
    echo category_description($thecatid);
    ?>

    the only activated css custom code is:
    #custom .feat-post .feat-meta,#custom .feat-content { display:none; }

    I know that this isn't the best solution. If you can help me please advise.

    http://1lyk-chiou.chi.sch.gr/site/
    project category is the tested one

    Kind Regards
    John

  7. Richie KS
    Member
    Theme Author

    Posted 1 month ago #

    seem to be showing fine. is it?

  8. jsirris
    Member
    Posted 1 month ago #

    Yes, it works ok!

    It was very helpful to inform me that this file (feat-cat-meta-top.php) was responsible for showing category info (first post) in first page.

    I still have two questions:
    1. What is the dif between blog and blogroll and how do you use it in displaying posts of a specific category since these templates are used per page?
    2. How to display 2 ads one side the other. It seems that the second adv goes a little lower that the first one (even when they are small enough to be in the same line)

    Anyway, I will check it out and if I don't find a workaround, I will post you a new question.

    Thank you again for this wonderful theme and for your help.

    Kind Regards
    John

Reply

You must log in to post.

About this Theme

About this Topic