grintoul
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Add a second RSS 2 feedAny suggestions? Thanks
Forum: Themes and Templates
In reply to: Post posted within last 12 hours?Now resolved. Solution:
if ( (current_time(timestamp) – get_the_time(‘U’) – (get_settings(‘gmt_offset’) * 3600) ) < 43200 ){
Forum: Developing with WordPress
In reply to: Was a post posted within last 12 hours?Hi… ignore that. Just figured out why it wasn’t working… offset is in hours, so needs to be multiplied by 3600 to get seconds. Full line I needed was:
if ( (current_time(timestamp) – get_the_time(‘U’) – (get_settings(‘gmt_offset’) * 3600) ) < 43200 ){
Thanks again for all your help, I really appreciate it!
Forum: Developing with WordPress
In reply to: Was a post posted within last 12 hours?Hi
Thanks for your reply – worked a treat ?? And also reminded me I’ve not yet changed my system time to reflect daylight savings!
However, even once I did it’s still an hour out… I’m 1 hour ahead of GMT so I think I do need to set the GMT offset. Would you be able to tell me how to do this? Had a look at https://codex.www.ads-software.com/Function_Reference/current_time but it’s incomplete.
Thanks again
Guy
Forum: Developing with WordPress
In reply to: Was a post posted within last 12 hours?Sorry – I’ve posted this in the wrong category. Have re-posted under templates as don’t know how to change the category. If an admin could delete this version of the post I’d appreciate it. Sorry!
Forum: Plugins
In reply to: Search category namesHi Kafkaesqi,
Great plugin! Got a bug report for you though. If the user searched for anything containing an apostrophe (‘) it returns the following error. Any suggestions?
Thanks for the great plugin,
GuyWordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘%’ AND post_type = ‘post’ AND post_status = ‘publish’ ORDER BY post_date DESC ‘ at line 1]
SELECT SQL_CALC_FOUND_ROWS DISTINCT wp_posts.* FROM wp_posts LEFT JOIN wp_post2cat ON ID = post_id LEFT JOIN wp_categories ON cat_ID = category_id WHERE 1=1 AND (((post_title LIKE ‘%%’) OR (post_content LIKE ‘%%’))) AND (post_type = ‘post’ AND (post_status = ‘publish’ OR post_status = ‘private’)) OR cat_name LIKE ‘%’%’ AND post_type = ‘post’ AND post_status = ‘publish’ ORDER BY post_date DESC LIMIT 0, 20Forum: Fixing WordPress
In reply to: 301 redirect on Apache server?Hi niziol –
Thanks for the great post, for someone like me who doesn’t understand what’s going on with .htaccess it’s great for someone to spell it out for me ??
One question, though… If 2 people link to my site, one to https://www.mydomain.com and one to https://www.mydomain.com/, will google see these as two separate sites or does the redirect tell google to see them as the same site?
thanks,
guy
Forum: Fixing WordPress
In reply to: Multiple blogsI gave in and followed the link ??
Just another question following on from that then…
@doodlebee, you said:
“In the wpconfig file, you just have to give the tabel prefix a different name. Default is “wp_” – change it to something else and do the installation as you normally would.”Is there an advantage to using this single database method over multi database method or vice-versa?
Forum: Fixing WordPress
In reply to: Multiple blogsOK great, thanks for your help – will look into it more thoroughly then.
I have a dissertation due in for college on Friday – I should probably do that first before I follow that link or it’ll never get done! ??
Thanks again
Forum: Fixing WordPress
In reply to: Multiple blogsSorry, I should have said, I’ve searched the forums and looked at https://mu.www.ads-software.com/ but am still unclear as regards root vs subdirectory. Thanks