Forum Replies Created

Viewing 15 replies - 1 through 15 (of 56 total)
  • Thread Starter sollynz

    (@sollynz)

    Thread Starter sollynz

    (@sollynz)

    Cheers for the help.

    Renamed my plugins folder and created a new one which fixed the blank screen problem, just going through the plugins one by one to find the problem.

    Thanks

    Thread Starter sollynz

    (@sollynz)

    Cheers for the fast reply

    Will resetting my plugins, remove all the settings/data that is currently there ?

    Thread Starter sollynz

    (@sollynz)

    any ideas ;o sorry for bumping

    Thread Starter sollynz

    (@sollynz)

    bump

    Thread Starter sollynz

    (@sollynz)

    Any body got any ideas for this post ?

    I have a page called lineup.php which consists of a 7 scrolling panels (one for each day) below is my code for Monday, and each day is repeated this but obviously for each days category. There is also a Monday to sunday navigation at the top of the page where users can click on a day and it will take them to that panel.

    <div class=”panel” id=”monday”>
    <div class=”postCopy” style=”font-size:13px; line-height:1.8em;”>
    <h3 class=”day”>Monday</h3>

      <?php $my_query = new WP_Query(‘category_name=monday&showposts=15&order=ASC’);
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID;?>

      <?php
      $timestart = get_post_meta($post->ID, ‘timestart’, true);
      $timeend = get_post_meta($post->ID, ‘timeend’, true);
      $genre = get_post_meta($post->ID, ‘genre’, true);
      $permalink = get_permalink();
      ?>

    • <p class=”lineupTime”><?php echo $timestart; ?> – <?php echo $timeend; ?></p> <span class=”showName”>” rel=”bookmark” title=”<?php the_title_attribute(); ?>”><?php the_title(); ?> – (<?php echo $genre; ?>)</span>
    • <?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>

      <?php endwhile; ?>

      <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>

      <?php endwhile; endif; ?>
      <?php echo $category->category_description; ?>

    </div>

    </div>

    My first question is:

    The $timeend custom field which i’ve had to set to 05:59,08:59 etc etc so it rolls over smoothley for each show looks a bit messy when echoed on the page. I was wondering if its possible to echo the timeend custom field but somehow make it display so instead of it being 05:59, it would be 06:00 – With out going into the custom fields and changing them to that?

    My Second question is:

    With each of those panels displaying, How can i make it so that when someone clicks on the lineup page the first panel which is displayed is the current day, rather than it always being Monday.

    Any help would be greatly appreciated.

    Thread Starter sollynz

    (@sollynz)

    Solved the issue,

    Changed the date in the first two lines to

    <?php
    $thisday = date_i18n('l');
    $thishour = date_i18n('H:i');
    Thread Starter sollynz

    (@sollynz)

    Sorry for the multiple posts just using this as reference for my self

    Okay so i’ve gone back to that original code you posted Michael and that’s working, How ever I’ve still got that issue of it displaying 12 hours behind.

    I tried adding this line of code from the second piece of code you posted

    if ( $timeend < $timestart ) {
            $timeend = substr($timeend,0,2)+25 . substr($timeend,2,3);
          }
          if ( $thishour>=$timestart  && $thishour<=$timeend ) { ?>

    How ever that doesn’t change anything.

    The second lot of code you posted is not working at all for me now which is strange because it was.

    Sorry I dont understand much php so im a little confused here.

    Thread Starter sollynz

    (@sollynz)

    Actually wtf, weird my header.php file somehow restored an older version where i was using that first piece of code you posted Michael. Now that new code doesn’t want to work at all ><

    Thread Starter sollynz

    (@sollynz)

    Also i was just wondering if you knew how i could fix two other issues im having.

    I have a page called lineup.php which consists of a 7 scrolling panels (one for each day) below is my code for Monday, and each day is repeated this but obviously for each days category. There is also a Monday to sunday navigation at the top of the page where users can click on a day and it will take them to that panel.

    <div class="panel" id="monday">
                   <div class="postCopy" style="font-size:13px; line-height:1.8em;">
                   <h3 class="day">Monday</h3>
                   <ul>
                <?php $my_query = new WP_Query('category_name=monday&showposts=15&order=ASC');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID;?>
    
               <?php
    				$timestart = get_post_meta($post->ID, 'timestart', true);
    				$timeend = get_post_meta($post->ID, 'timeend', true);
    				$genre = get_post_meta($post->ID, 'genre', true);
    				$permalink = get_permalink();
    		?>
    				<li><p class="lineupTime"><?php echo $timestart; ?> - <?php echo $timeend; ?></p> <span class="showName"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a> -  (<?php echo $genre; ?>)</span></li>
    				<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
    
              <?php endwhile; ?> 
    
      <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; update_post_caches($posts); ?>
    
      <?php endwhile; endif; ?>
                   <?php echo $category->category_description; ?>
                   </ul>
                   </div>
    
                     </div>

    My first question is:

    The $timeend custom field which i’ve had to set to 05:59,08:59 etc etc so it rolls over smoothley for each show looks a bit messy when echoed on the page. I was wondering if its possible to echo the timeend custom field but somehow make it display so instead of it being 05:59, it would be 06:00 – With out going into the custom fields and changing them to that?

    My Second question is:

    With each of those panels displaying, How can i make it so that when someone clicks on the lineup page the first panel which is displayed is the current day, rather than it always being Monday.

    Any help would be greatly appreciated.

    Thread Starter sollynz

    (@sollynz)

    Legend Michael,

    Thats been working fine thank you so much, How ever since daylight savings has come around it has gone back 12 hours and is now displaying 12 hours earlier instead.

    I have tried changing date/time settings in the wordpress admin panel but nothing seems to change there.

    I have even set up a page to display the server time and it is correct.

    I also echoed the $thisday & $thishour and its displaying the wrong time/day

    Any ideas how i can resolve this ?

    Thread Starter sollynz

    (@sollynz)

    Sorry for bump but really need to solve this ><

    Thread Starter sollynz

    (@sollynz)

    Also just looking at this line here

    $cat_id = get_cat_ID(strtolower($thisday));

    Say for example i have a show which is on the same time every day, So it would be posted in cats monday,tuesday,wednesday,thursday,friday,saturday,sunday by default the slug for this will be

    url.com/lineup/monday/showname

    Is this going to cause problems ? as when i hover over the current shot which displays with the code you posted. The slug for it is monday.

    Is this going to be a problem ? or do i need to create the same show for each day/category ?

    Thread Starter sollynz

    (@sollynz)

    are the values of my custom fields fine ?

    example:

    First Show
    timestart: 00:00
    timeend: 06:00

    Second Show
    timestart: 06:00
    timeend: 08:00

    Third Show
    timestart: 08:00
    timeend: 10:00

    Forth Show
    timestart: 10:00
    timeend: 12:00

    Fifth Show
    timestart: 12:00
    timeend: 14:00

    etc etc back to

    Last Show
    timestart: 22:00
    timeend: 00:00

    Thread Starter sollynz

    (@sollynz)

    Hey Micahel,

    Thank you for your reply

    That is displaying the first show of today, rather than the one at the correct time of today ?

    Any ideas

    Kind Regards
    – Solly

Viewing 15 replies - 1 through 15 (of 56 total)