Šī spraudnis nav atjaunināts vairāk kā divus gadus. Varbūt, tas vairs netiek uzturēts, nesaņemt atbalstu un tam var būt saderības problēmas ar jaunākām WordPress versijām.

Time and Date Shortcodes

Apraksts

Shortcodes for displaying the current year, day and time.

Available shortcodes:

  • [hours] will display the current time in 12h format
  • [time] will display the current time in 24h format
  • [day] will display the date of the week
  • [d] displays the current day of the month
  • [m] displays the current month
  • [Y] displays the current year

These shortcodes can be combined to display dates in different formats, for example:

  • [d] [m] [Y]
  • [m].[d].[Y]
  • [d]/[m]/[Y]
  • [m]/[d]/[Y]
  • [day][d]/[m]/[Y]
  • [day] [d]/[m]/[Y] [hours]

For more free WordPress plugins please visit plugins.club.

Ekrānuzņēmumi

Uzstādīšana

  1. Upload the plugin file to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.

For basic usage, you can also have a look at the plugin web site.

BUJ

How to use the plugin?

Insert shortcode where you want to show them.

Can I use it in the block editor (Gutenberd)?

Yes, you can insert shortcodes anywhere.

Why is the shortcode result not updated for every single visit?

Caching plugin!

If you are using a caching plugin you may need to exclude the page or post with the shortcode from it so the content may be generated dynamically.

Do shortcodes work in all places e.g. post title, footer, menus, etc.?

No, by default WordPress allows shortcodes to be used only in the post’s content and widgets. If your theme does not apply shortcodes in other places automatically you may need to add additional code to your child theme’s functions.php to hook into those functions where you need to see the shortcodes applied.

For example:

// Add Shortcodes to title.
add_filter(‘wp_title’, ‘do_shortcode’, 10);
add_filter(‘the_title’, ‘do_shortcode’, 10);



// Add shortcodes to the menu
add_filter(‘walker_nav_menu_start_el’, ‘do_shortcode’, 10);

Another option to allow use of shortcodes anywhere on the website it to use an additional plugin such as Shortcodes Anywhere.

I have an idea on how to improve this plugin!

Please send all your suggestions and ideas to our email address and they may be developed and included in the plugin in future.

Atsauksmes

Lasīt 1 atsauksmes

Autori un izstrādātāji

“Time and Date Shortcodes” ir atvērtā pirmkoda programmatūra. Šo spraudni ir veidojuši šādi cilvēki.

Līdzdalībnieki

Tulkot “Time and Date Shortcodes&#8221 savā valodā.

Vai jūs interesē attīstība?

Pārlūkojiet kodu, apmeklējiet SVN krātuvi vai abonējiet attīstības žurnālu, ko izveidojis RSS.

Izmaiņu žurnāls

1.0

  • Initial release