Support » Themes and Templates » Mystique – Year included in "posted date" on blog entries

  • In this forum thread:
    I found a way to add year to the posted-date shown on each blog post. (as I have implemented on ).
    This fix involved modifications to the core.php file.
    It does work, but I guess it will disappear on upgrade of Mystique to a newer version. So I wonder if there is a more sustainable way of doing this, by keeping the modification in “User CSS” or possibly “User Functions” areas and not mess with core wordpress or theme files?

    The modification to core.php was:

    <p class="day"><?php the_time('M jS') ?></p>

    <p class="day"><?php the_time('jS M Y') ?></p>

    Any better suggestion would be appreciated..

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hey there,

    The easiest way I can think of is to log in to your WordPress Dashboard then go to Settings->General Settings then change the Date Format to a custom one with the value of jS M Y.

    Hope that helps!

    Bronson Quick:
    Thanks for your response!

    No, unfortunately that doesn’t do the trick.
    As you can see from the above code sample from core.php, they override the setting I have configured in your general settings. I don’t really know why thay haven’t either using that value, or have their own theme preference that can be set.

    Anyone else?

    PS: Let me add that I am generally really, really impressed with the Mystique theme, and the work thats been put into it by DigitalNature.
    This is the only modification I have had to do in core files.
    Everything else has been done in their “User CSS” theme preference.

    Let me add that I now have changed the date format mask to include even the day, using
    <p class="day"><?php the_time('l j. M Y') ?></p>

    It might be helpful to see the whole context of this, so this is the complete PHP-block its found in:

    <?php if($post_settings['post_info'] && !get_post_meta($post->ID, 'asides', true)): ?>
         <div class="post-date">
           <p class="day"><?php the_time(__('l j. M Y','mystique')); ?></p>


    Ahh okay then. I’m with you now. I haven’t got that theme I was just having a crack based on other themes. That’s really kinda bad coding on their part because the user should have the option to customised it.

    What I’d personally do it change:
    <p class="day"><?php the_time('M jS') ?></p>

    <p class="day"><?php get_the_date(); ?></p>

    That value will grab the date and format it to whatever is in the setting that I mentioned above. I’d also send an email to the Mystique Theme guys and get them to alter the core files in the theme to have that so users can control the date format 🙂

    Hope that helps.

    Eeeek, make that:

    <p class="day"><?php echo get_the_date(); ?></p>

    I forgot the echo! 🙂

    Thanks, thats a good idea. Not that it matters much in this case, the postinstall/postupgrade edit is still there. I will see if I can find the contact details and send them an enhancement request.


    It’s always good to get feedback as a theme author cause a lot of the time we don’t test things like that so when users give us feedback on little things like that we’ll change our themes to give the users more options going forward!

    Oh, by the way:
    My blog is mostly in Norwegian. Do you know how I can localize the output of these date functions? So that I get the Day and Month in Norwegian spelling?

    Current (US English):
    Tuesday 7. December 2010

    Wanted (Norwegian):
    Tirsdag 7. Desember 2010

    Either hardcoded, or based on browser locale.

    PS: Let me admit that I have done absolutely nothing to find out, not even a google search. It was just something that struck me right now. If you want me to do my own homework,thats fine…

    To set the language in WordPress you normally have to add a line into the wp-config.php file in the root directory.

    define ('WPLANG', 'nb_NO');
    define ('WPLANG', 'nn_NO'); should work for you.

    Norwegian (norsk)

    Thanks a lot for your help!
    I will checkout the link you supplied, and read up on localisation. Not something i just want to jump into, as it may have undesired side-effects. I will play around a little on my testsite and se what I do.

    I leave this thread open for a little while and see if anyone else would like to chime in..

    I couldn’t find an email address to use for submitting such a request, so I just submitted it as a comment on their feedback/discussion for Mystique. I guess there a good chance it will just drown in between all the other 7000+ comments, but lets see.

    I don’t want to point fingers, after all this is a free theme, and I can understand that with its popularity there would be a lot of support involved in having an open email.

    I guess the proof of this themes quality is the fact that this is the only quirk I have found… (+ having to copy the favicon.ico file manually to override the builtin…)

    So well done, DigitalNature! And thanks for sharing.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Mystique – Year included in "posted date" on blog entries’ is closed to new replies.