• i am have a random divider bar for each post( https://islandcastaway.com/log/index.php ) but i would like it to show just between the days, not every post. my index.php is :

    <?php
    get_header();
    ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <div class=”post” id=”post-<?php the_ID(); ?>”>

    <?php the_date(”,’Captains Log Sea date ‘,”); ?> </h3><?php edit_post_link(__(‘Edit This’)); ?>
    </div>
    <div class=”storycontent”>
    <?php the_content(__(‘(more…)’)); ?>
    </div>
    <div class=”feedback”>
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    </div>
    </div>

    <img class=”logo” src=”<?php echo c2c_random_file(‘../clipart/bars/’); ?>” />

    <?php comments_template(); // Get wp-comments.php template ?>
    <?php endwhile; else: ?>

    <?php _e(‘Sorry, no posts matched your criteria.’); ?>

    <?php endif; ?>
    <?php posts_nav_link(‘ — ‘, __(‘« Previous Page’), __(‘Next Page »’)); ?>
    <?php get_footer(); ?>

    how can i get this to just be once a day

    <img class=”logo” src=”<?php echo c2c_random_file(‘../clipart/bars/’); ?>” />

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter beachbum

    (@beachbum)

    ttt

    Are the one line text in between those dividers your posts? or messages?

    I took a look but I couldn’t work out where your “day” section stops and starts.

    Your font was extremely difficult to read.

    Thread Starter beachbum

    (@beachbum)

    the dividers are the clipart bars in between each post(alot of 1 liners now, im testing sms messages). the day section starts “captains log log(date)”

    i only want the clip art divider bars once a day, not each post. im looking into the “<?php the_date” function to see how that is only called once.

    ps. this is from the wordpress classic theme

    Thread Starter beachbum

    (@beachbum)

    heres the date function, im lost:
    function the_date($d=”, $before=”, $after=”, $echo = true) {
    global $id, $post, $day, $previousday, $newday;
    $the_date = ”;
    if ( $day != $previousday ) {
    $the_date .= $before;
    if ( $d==” )
    $the_date .= mysql2date(get_settings(‘date_format’), $post->post_date);
    else
    $the_date .= mysql2date($d, $post->post_date);
    $the_date .= $after;
    $previousday = $day;
    }
    $the_date = apply_filters(‘the_date’, $the_date, $d, $before, $after);
    if ( $echo )
    echo $the_date;
    else
    return $the_date;
    }

    Thread Starter beachbum

    (@beachbum)

    need a php function to apply filters to show my code like “the_date” function.

    Actually, if you’re using the default setup (where the date only displays once per group of same-date posts) you could put the bars below the date, which might accomplish something similar to what you’re looking for.

    Like this:

    <?php the_date('','<h3>','</h3>','<img src="link to image here" alt="" />'); ?>

    Note please that I haven’t tried that code, but I *think* it should work.

    [Edit: no it does NOT work. Let me work on it some, ‘kay?]

    Thread Starter beachbum

    (@beachbum)

    1. putting it before the date would be better but messes up the top and bottom posts.

    2. i have a php echo inside my img cmd( <img class=”logo” src=”<?php echo c2c_random_file(‘../clipart/bars/’); ?>” />
    )

    3. im really looking for a day wrapper effect.

    Thread Starter beachbum

    (@beachbum)

    need a php function to apply filters to show my code like “the_date” function.

    Thread Starter beachbum

    (@beachbum)

    ttt
    i really really need a code like the_date to show a image only once per day,

    Thread Starter beachbum

    (@beachbum)

    i cant believe that it is this hard to get a php function to show once per day.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘post divider bars’ is closed to new replies.