WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Add date beside post title

[Resolved] Add date beside post title

Viewing 15 replies - 1 through 15 (of 20 total)
  • Hey!

    Why don’t you just enable the box next to the “Display Publish Date ” option in your plugin settings? Here’s a screenshot for easier navigation: https://www.diigo.com/item/image/3v5jq/iycq

    Let me know if you had this or something else in mind. Also — if you would like to change how the date looks like, send us the link to the blogpost in question and I’m sure we’ll be able to customize it via the CSS code.

    Take care & I’m looking forward to your reply!

    Best,
    Silvo

    Thanks Silvo. Because i want my custom date behind post title, hence i just want to know where is extactly location i should to add that code.

    The date should be look like this: http://www.hivietnam.net/vi/04/2013/ve-dep-pho-nui/

    Hey!

    Sorry for not getting back to you earlier, but we finally managed to “solve your problem”! 🙂

    Here’s the deal — go to your WordPress’s Dashboard under the tab ‘Plugins’-‘Editor’ and select our plugin (“WordPress Related Posts”) to edit (in the top right corner of your screen).

    Now, find the following code (it should be in the 270th line):

    $output .= '<a href="' . $post_url . '" class="wp_rp_title">' . wptexturize($related_post->post_title) . '</a>';

    After this line of code paste the one from above; so now it should look something like this:

    $output .= '<a href="' . $post_url . '" class="wp_rp_title">' . wptexturize($related_post->post_title) . '</a>';
    $output .= '<label style="color:#888888;font-size:11px;padding-top:2px;font-style:italic;"> (' . date_format(date_create($related_post->post_date),"d/m/Y") . ') </label>';

    We also recommend that you change <label> into <span>.

    Either way — do let me know how it goes or if you need any further assistance. I’ll gladly help! 🙂

    Take care & have a nice day!

    Best,
    Silvo

    Perfect. Thanks brother 🙂

    You’re welcome, glad it worked out for you! 🙂

    You are always welcome to leave a vote or a review about us on our plugin page on the WordPress website, if you find the time. It shouldn’t take you more than a minute (two, if you write something nice)! 🙂

    As always — if you have any questions or if you stumble upon any problems, do not hesitate to let us know! We’ll gladly help!

    Take care & have a nice day!

    Best,
    Silvo

    Hi again,

    I have another issue after update to newest version.

    My code: $output .= ‘<label style=”color:#888888;font-size:11px;padding-top:2px;font-style:italic;”> (‘ . date_format(date_create($related_post->post_date),”d/m/Y”) . ‘) </label>’; does not display date based on post_date anymore, it’s just display today.

    Could you please help me check it? My URL: http://www.nhadep.net/vi/12/2012/18-kieu-phong-khach-hien-dai/

    Thank you.

    Hey!

    Try with the code below and let me know if it helped you out in any way:

    $output .= ‘<label style=”color:#888888;font-size:11px;padding-top:2px;font-style:italic;”> (‘ . mysql2date(“d/m/Y”, $related_post->post_date) . ‘) </label>’;

    Take care & let us know how it goes!

    Best,
    Silvo

    It’s not works Silvo. Could we try another code?

    Hm, we have no idea what could be wrong. Can you try the following code?

    $output .= '<label style="color:#888888;font-size:11px;padding-top:2px;font-style:italic;"> (' . $related_post->post_date . ') </label>';

    Let us know how it goes!

    Still the same. I give up 🙁

    Hey!

    We took another look at your blog (http://www.nhadep.net/vi/12/2012/18-kieu-phong-khach-hien-dai/) and noticed that you have to sections of related posts under your blogposts — one of which is ours and the second one which is not.

    Correct me if I’m mistaken, but the second one (the one with the false date problem) is not our (“WordPress Related Posts”) plugin — can you confirm this?

    Here’s a screenshot of what we are seeing: http://cl.ly/image/162l2y1V0R2I

    Please let me know if this is the case or if I’m missing something out. I’ll gladly help! 🙂

    Take care!

    Best,
    Silvo

    Yes, you’re correct. I think this is extactly the issue Silvo 🙁

    What’s the name of that other related posts plugin (the one that’s not ours)? Have you tried to contact their team for help?

    Let us know and we’ll try to help you out! Take care!

    Thanks Silvo. Please cover me if they don’t help me out 🙁 I’m using another plugin is: Contextual Related Posts.

    Hey!

    Hope you don’t mind us asking, but we were wondering why having two sections of related posts, if you could just increase the number of related posts in our plugin settings? This way the dates would show up correctly. 🙂

    (We know this is none of our business, so you can easily ignore our previous question.) 🙂

    But if you would like to keep the same look you already have in your blogposts (two separated sections of related posts), then we would strongly recommend you to install our other plugin called ‘Related Posts by Zemanta’. It’s basically the same one as this one you are already using, but if you use the same CSS code as you did before, you could have the same look you already have, just that the dates would show up correctly.

    Let me know if you have any questions or if you need any assistance — I’ll gladly help!

    Take care & have a nice day!

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘[Resolved] Add date beside post title’ is closed to new replies.