Peter Berger
Forum Replies Created
-
Just a short question:
The date/time field now compares with the current UTC time, but my local time is one hour later. The timezone in my general Worpress settings is also set to an hour later (Amsterdam) and so is the time of my computer (I’m using WAMP).
Is there an option to compare the date/time field with the time of my WordPress installation (or local server)?
Thank you in advance!
You are good, Eliot! I wish I had your brains! ??
Thank you for your time to figuring this out.For some reason, when using some date-formats in the field options, the field is empty after saving the post (if “Save as timestamp” is set to “Yes” in the field options).
What works for me (maybe it could help others) is date-format dd/mm/yy and time-format HH:mm. A date-format without the slashes didn’t work for me.
My code is now like this:
[loop type="announcement" field="expires" value="future" orderby="field_num" order="ASC"] [content] Expires: [field expires in="timestamp" date_format="l j F Y //o//m H:i"] [if empty]No announcements.[/if] [/loop]
Sorting the posts, formatting the date & time and // before a character now works perfect! ??
Thanks again!
Forum: Plugins
In reply to: [Custom Content Shortcode] html fieldEliot, I have to thank you for this awesome plugin! This weekend I will make a donation and write a review…
laikmosh, if the theme you’re using has
get_template_part( 'content', get_post_format() );
inside (your copy of) single.php, than you have to replace it with the code from content.php (if you don’t want to effect the shortcodes to al your single posts). Than look in the code for a div with a class like “entry-content” and replace all the code inside that div withecho do_shortcode('[content type="template" name="single-post"]');
Forum: Plugins
In reply to: [Custom Content Shortcode] html fieldIf you want to make a “template” for a single post template, maybe this could help you. I do this as follow:
I created a custom post type “template” and a new (template) post named “single-gallery” (because I have a Gallery post type). I inserted the shortcodes I need in that post and saved it.
Then I inserted the following code in place of the default content/template fields in my template file “single-gallery.php” in the current theme folder:
<?php echo do_shortcode('[content type="template" name="single-gallery"]'); ?>
Thank you for replying so quick! I’ll be patience for the next release!