sollynz
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Category Listings PageForum: Fixing WordPress
In reply to: WordPress Blank ScreenCheers 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
Forum: Fixing WordPress
In reply to: WordPress Blank ScreenCheers for the fast reply
Will resetting my plugins, remove all the settings/data that is currently there ?
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of Dayany ideas ;o sorry for bumping
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of Daybump
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DayAny 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’);
- <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>
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();
?><?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.
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DaySolved the issue,
Changed the date in the first two lines to
<?php $thisday = date_i18n('l'); $thishour = date_i18n('H:i');
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DaySorry 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.
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DayActually 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 ><
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DayAlso 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.
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DayLegend 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 ?
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DaySorry for bump but really need to solve this ><
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DayAlso 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 ?
Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of Dayare the values of my custom fields fine ?
example:
First Show
timestart: 00:00
timeend: 06:00Second Show
timestart: 06:00
timeend: 08:00Third Show
timestart: 08:00
timeend: 10:00Forth Show
timestart: 10:00
timeend: 12:00Fifth Show
timestart: 12:00
timeend: 14:00etc etc back to
Last Show
timestart: 22:00
timeend: 00:00Forum: Fixing WordPress
In reply to: Display Title of Post Depending on Time of DayHey 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