Chris45454
Forum Replies Created
-
Forum: Plugins
In reply to: [WP-PostRatings] Warning: gmdate() expects parameter 2 to be longLooks like that fixed it!
The logs deleted successfully, and I’m no longer getting the errors when visiting postratings-manager.php
Thanks!
Forum: Plugins
In reply to: [WP-PostRatings] Warning: gmdate() expects parameter 2 to be longYup, set as:
London
Date format: July 11, 2014
Time Format: 2:56pmForum: Hacks
In reply to: Trying to display some html inside a wordpress template page for a specific urlYou’ve been such a big help, thankyou !!
Is it possible to also go specific for1 directory deeper? For example:
$url = explode('/', $_SERVER['REQUEST_URI']); if ($url[count($url) - 1] == '') { $currentpage = $url[count($url) - 2]; } else { $currentpage = $url[count($url) - 1]; } switch ($currentpage) { case 'restaurants': include (TEMPLATEPATH . '/template-restaurant-full.php' ); break; case 'cuisine/british': include (TEMPLATEPATH . '/template-restaurant-british.php' ); break; case 'listing': include (TEMPLATEPATH . '/template-restaurant-listing.php' ); break; default: include (TEMPLATEPATH . '/restaurant-sidebar-main.php' ); }Thanks again!
Forum: Hacks
In reply to: Trying to display some html inside a wordpress template page for a specific urlThankyou linux4me2, you’ve been so helpful!
Unfortunately I’ve just noticed that the plugin does no enforce a trailing ‘\’ for every URL. Instead of redirecting it uses a canonical tag to define:
domain.com/restaurants/reviews as the primary url Grrrrr
Would there be anyway to make the above code word on urls that don’t have a trailing ‘\’
Eg:
domain.com/restaurants
domain.com/restaurants/reviews
domain.com/restaurants/photos
domain.com/restaurants/listingsSorry for not realizing this was the case earlier!
Forum: Hacks
In reply to: Trying to display some html inside a wordpress template page for a specific urlFantastic – thankyou so much!
Sorry to ask for one more thing, but is it possible to include an if/else condition in there somewhere?
I tried:
$url = explode('/', $_SERVER['REQUEST_URI']); $currentpage = $url[count($url) -2]; if ($currentpage == 'restaurants') { echo 'Restaurant intro.'; } elseif ($currentpage == 'restaurants/listing/') { echo 'review intro.'; } elseif ($currentpage == 'restaurants/reviews/') { echo 'Reviews intro'; } else { echo 'No intro.'; }But it doesn’t appear to be working.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Image insert – blank pageThanks for the quick reply!
It was my theme that was causing the issues.
Awesome stuff!
Forum: Fixing WordPress
In reply to: query Posts: Last 30 days & specific category – 50% working@keesiemeijer: Yeah on custom page templates.
Forum: Fixing WordPress
In reply to: query Posts: Last 30 days & specific category – 50% working@nitin_8: Doesn’t work, sorry.
@keesiemeijer: Thanks, but am getting the following error:
Parse error: syntax error, unexpected T_FOR in /public_html/wp-content/themes/2012/functions.php on line 961
I’d like to able to use the query across a number of custom pages, so if there’s a way to just amend the original query to include categories specifically that would be great.