• Resolved moonwoff

    (@moonwoff)


    I would like to change the time and date (and the other info that I have at that row) to look the same in the archive that it looks like at the blog page.
    What do I have to do?

    My page
    The archive you find from sidebar – click at Arkiv – click at for example oktober and there comes the archive page(S).

    Thanx in advance!

Viewing 15 replies - 1 through 15 (of 16 total)
  • Thread Starter moonwoff

    (@moonwoff)

    I have been looking at them without any luck. =o/

    I haven´t figured out how to change it. This is the code to the archive.

    <div class="entry-date">
    <abbr class="published" title="<?php the_time('Y-m-d\TH:i:sO') ?>">
    <?php unset($previousday); printf( __( '%1$s – %2$s', 'sandbox' ), the_date( '', '', '', false ), get_the_time() ) ?>
    </abbr>
    </div>

    And this is to the index.php.

    <div class="post-title">
         <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
         <span class="post-comments"><?php the_time('d.m.Y') ?> @ <?php the_time('H:i') ?> - <?php the_category(', ') ?> - <?php comments_popup_link('Kommentarer (0)', 'Kommentarer (1)', 'Kommentarer (%)'); ?>
    </span>
    </div>

    I am happy for any help at all.

    Thread Starter moonwoff

    (@moonwoff)

    Somehow the time is in archive set to am/pm and this is not how I have it in the blog (6.45/18.45). Where can I find the code to change this? If possible? This is one of the problems…

    You’ll have to style it the same way as your index is.

    Open your style.css and post those two classes (post-title & entry-date). And we’ll be able to help you.

    Try changing:

    <?php unset($previousday); printf( __( '%1$s – %2$s', 'sandbox' ), the_date( '', '', '', false ), get_the_time() ) ?>

    to:

    <?php the_time('d.m.Y') ?> @ <?php the_time('H:i') ?>

    Thread Starter moonwoff

    (@moonwoff)

    .post-title {
    	width: 430px;
    	padding-bottom: 20px;
    	clear:both;
    }
    .entry-date {
       	padding-bottom: 20px;
    }
    Thread Starter moonwoff

    (@moonwoff)

    esmi, that helped! Thanx a lot.

    Is it possible to get the category and the comment after (at the same row) the code you gave me? As in the index.php.

    Thread Starter moonwoff

    (@moonwoff)

    I am really new at php coding and I had no thoughts of to change the hole code there, just the things IN the particullary code part. *embarressed*

    Thread Starter moonwoff

    (@moonwoff)

    Can somebody give me an explanation for why I have to use this code to
    take away the border under the abbr-code?

    .published {
       	border-bottom: none;
    }

    The abbr-code

    <abbr class="published" title="<?php the_time('d.m.Y') ?>"><?php the_time('d.m.Y') ?> @ <?php the_time('H:i') ?> -
    </abbr>

    By the way, as you see I got it to work as I want this part of the code.

    The default display for <abbr></abbr> in most common browsers is a dotted underline.

    Thread Starter moonwoff

    (@moonwoff)

    ahaa. okidoki. Just to be on sure, I have done right to put that code in the css?

    Is it okey to change the archive.php like I have done?
    Or do I have to change somewhere else also something (meaning if I have to go and change anything in the function.php or so…)?

    I have done right to put that code in the css?

    Sure – a lot of people don’t like the dotted underline. I normally remove it or fade it right back into the background.

    Your archive.php file should work OK but as I’m not that familiar with the Sandbox framework, it wouldn’t hurt to keep a backup of the original file around for a while – just in case…

    Thread Starter moonwoff

    (@moonwoff)

    How do I remove it?
    I haven´t heard of the possibility to fade it back into the background. How do you do that?

    It feel so unneccessary to put a “extra” css-code in css-file for this…

    Oki, this is the first time I´m trying to change the Sandbox so…
    … just in case I have the original files saved. =o)

    How do you do that?

    abbr {border-bottom:1px dashed #f8f8f8;}
    gives a very pale grey dashed underline suitable for a white background for example. And, remember, this is what CSS is for. 🙂

    Thread Starter moonwoff

    (@moonwoff)

    eeeh, if i was embarressed before, what am I know. Why did I not think of that… =o) The css gives possibilities. =o)
    Thanx!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Change date and time in archive’ is closed to new replies.