This topic has 21 replies, 3 voices, and was last updated 10 years by Abe.

  • Author
  • #2635
     jaybini
    Participant

    I want to add the date to blog posts and to the recent posts widget, where can i do it and whats the code ?
    Thank you

    #2691
     SQadmin
    Keymaster

    Hi,
    Date is already in the blog posts. Is shows just bellow the title.
    To modify the widget you have to edit main theme file which is not recommended. If you want to to do that the file is located in framework/widgets/widget_recent_posts.php
    Somewhere around line 59 you can render the date using this function:

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2824
     jaybini
    Participant

    i did add <?php echo get_the_date();?> but nothing happened ? i don’t c any change i tried commenting lines and doesn’t either work :s

    #2865
     SQadmin
    Keymaster

    Try re-saving the widget. On what line have you added it?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2889
     jaybini
    Participant

    line 61
    <p>
    <?php the_title(); ?> <br/><?php echo word_trim(get_the_excerpt(), $length, ‘…’ ); ?>
    <br/><?php echo get_the_date(); ?>
    “>
    <?php _e(“read more”, ‘kleo_framework’); ?>

    </p>

    #2891
     jaybini
    Participant

    Anyways I want to make the latest post appear next to the search in the homepage like this website as u can c the posts appear on the top of the page http://www.people.com/people/ on the side there’s The Latest, Most Shared etc. , I want to make something like that but looks neat beside the search.
    could u help please

    #2905
     SQadmin
    Keymaster

    Not good. It should be on line 59: http://d.pr/n/gaxH

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2907
     SQadmin
    Keymaster

    Hi, You can install this plugin so you can render any widget using a shortcode: http://wordpress.org/plugins/amr-shortcode-any-widget/

    Follow the instruction on how create a widget that can be called from a shortcode and then you need to modify this page template: sweetdate/page-parts/home-search-form.php. Copy it to sweetdate-child/page-parts/home-search-form.php and put this contents:
    http://d.pr/n/ibVS

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #2943
     jaybini
    Participant

    i did all of that but still it gets me the error of debugging “Widget not found in widget list. Try debug”
    and i press debug , and the debug list appear i don’t know which one is the id and what am i supposed to write?
    I tried ur code do_widget code but not working ,
    after i pressed debug i found kleo_recent_posts-3 which i added into the shortcode plugin
    and put in the home-search-form.php <?php echo do_shortcode(‘[do_widget kleo_recent_posts-3]’); ?> but not working still

    #2966
     jaybini
    Participant

    @sqadmin Please help its urgent to make it work
    Thank u

    #2995
     SQadmin
    Keymaster

    Give me acces to your site to take a look,. I think is quicker. Send a reply and check “Set as private reply”

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3032
     jaybini
    Participant
    This reply has been set as private.
    #3044
     SQadmin
    Keymaster

    Now it shows on the home page. I had to add id like this:
    [do_widget id=kleo_recent_posts-3]
    Where the id is the widget id took from the debug

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3045
     jaybini
    Participant
    This reply has been set as private.
    #3049
     SQadmin
    Keymaster

    I replied above: https://archived.seventhqueen.com/forums/topic/blog-posts#reply-3044

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3050
     jaybini
    Participant

    thank you sooo much @sqadmin for ur help
    Great support thank u again

    #3063
     jaybini
    Participant

    one last thing , I just noticed that only signed in users can c the recent posts. how can i make guests c the posts too ?

    #3065
     SQadmin
    Keymaster

    When you are not logged in the register form appears so you have to modify this template like the one with the search form: page-parts/home-register-form.php
    http://d.pr/n/hU5O

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #3215
     jaybini
    Participant

    Hey sqadmin,
    where can i find the recent_posts-3 code so i can edit it?
    iI want to edit the html add some <p> <span> and so on

    #3277
     SQadmin
    Keymaster

    Hi, The widget is located in sweetdate/framework/widgets/

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution
    #8677
     jaybini
    Participant

    1. I made the same but to “recent topics” but where can i edit the html code of recent topics ?

    2. I want also to make the same for “Forum categories” i used before for the blog posts categories the following code

    <?php
    $catquery = new WP_Query( 'cat=1&posts_per_page=5' );
    while($catquery->have_posts()) : $catquery->the_post();
    include('latest-news.php');
    endwhile;
    ?>

    #8718
     Abe
    Keymaster

    Hi, You should search on bbPress forums to see how you can get them.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

Viewing 22 posts - 1 through 22 (of 22 total)

The topic ‘blog posts’ is closed to new replies.

Log in with your credentials

Forgot your details?