• Resolved pigsound

    (@pigsound)


    i like the hueman theme very much, but i still have to struggle a little with it:

    i’ve spent hours on searching for a way to hide the post date when displaying it in the alx-post widget. i checked all backend settings tabs, i found out that i can uncheck to show the category of a post, but not its post date.
    then i went into the theme files, but when i delete line 21 in content.php, nothing happens.
    also i would like to show not only the post title, but also the whole text. therefore in theme options/blog i set the excerpt length to 100 but nothing happened. again, i changed the entry in the content.php on line 28 from 0 to 100, but somehow those changes are not executed.

Viewing 15 replies - 1 through 15 (of 58 total)
  • AlxPosts widget would be edited in /hueman/functions/widgets/alx-posts.php

    Easiest way is to just add a line of custom css to hide the date:

    .alx-posts .post-item-date { display: none; }

    To add the_excerpt to each post, you would need to edit the widget around line 73. Line 73 is also the line to remove if you want to remove the date without the css-hide.

    <p class="post-item-date"><?php the_time('j M, Y'); ?></p>

    Thread Starter pigsound

    (@pigsound)

    i’ve tried to edit this line in alx-posts.php already, but without success. neither the post date disappears, nor does the excerpt show. i turned all plugins off to check if there is any interference from there, but this made no difference.
    do i have to clear some server cache or so?

    bravokeyl

    (@bravokeyl)

    You need to comment out that line to hide post date line 73.
    To show excerpt add the following code just below line 73
    <p><?php the_excerpt(); ?></p>

    Clear the cache

    Thread Starter pigsound

    (@pigsound)

    thank you, but that is just what i did.

    <div class="post-meta group">
    <p class="post-category"><?php the_category(' / '); ?></p>
    <!-- <p class="post-date"><?php the_time('j M, Y'); ?></p>  -->
    </div>

    bravokeyl

    (@bravokeyl)

    Add the code just below commented line to show excerpts.

    <p><?php the_excerpt(); ?></p>

    Did you clear the cache ?

    Thread Starter pigsound

    (@pigsound)

    i cleared the browser cache – i don’t know how to clear the server cache.

    funny enough, the changes i made in content.php are being executed.

    bravokeyl

    (@bravokeyl)

    oh! wait you it seems you are commenting in the content.php
    You have to go to hueman/functions/widgets/alx-posts.php

    line 73

    Thread Starter pigsound

    (@pigsound)

    bravokeyl, thanks for your reply – but i edited both hueman/functions/widgets/alx-posts.php and content.php. the changes in alx-posts.php were not executed, whereas the changes in content.php were executed correctly.

    bravokeyl

    (@bravokeyl)

    can you give us the site url please…

    Thread Starter pigsound

    (@pigsound)

    here it is.

    on the landing page, please note the right column (yellow background color), where you can only see the alx post title, but not the excerpt.
    on the page “kaleidoskop” you can see the working content.php, the post category and post date are not shown, exactly as i tweaked the code.

    Thread Starter pigsound

    (@pigsound)

    hi,
    have you already found out what is going wrong on my site?

    bravokeyl

    (@bravokeyl)

    can you post lines 71 -75 of alx-posts.php here

    Thread Starter pigsound

    (@pigsound)

    <div class="post-item-inner group">
    <?php if($instance['posts_category']) { ?><p class="post-item-category"><?php the_category(' / '); ?></p><?php } ?>
    <!--
    <p class="post-item-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
    <p class="post-item-date"><?php the_time('j M, Y'); ?></p>
    <p><?php the_excerpt(); ?></p>
    -->
    bravokeyl

    (@bravokeyl)

    That’s it you are commenting excerpt also..use the following

    <div class="post-item-inner group">
    <?php if($instance['posts_category']) { ?><p class="post-item-category"><?php the_category(' / '); ?></p><?php } ?>
    
    <p class="post-item-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></p>
    <!-- <p class="post-item-date"><?php the_time('j M, Y'); ?></p> -->
    <p><?php the_excerpt(); ?></p>

    Thread Starter pigsound

    (@pigsound)

    no, still doesn’t work. the thing is, i copied the code wrongly into my previous post. in the php script the excerpt has not been commented out… i’m very sorry for this confusion.

Viewing 15 replies - 1 through 15 (of 58 total)
  • The topic ‘hiding post date in alx-post widget?’ is closed to new replies.