{"id":69452,"date":"2017-06-05T05:06:00","date_gmt":"2017-06-05T05:06:00","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/taro-open-hour\/"},"modified":"2026-10-09T02:20:13","modified_gmt":"2026-10-09T02:20:13","slug":"taro-open-hour","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/taro-open-hour\/","author":13589055,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"2.3.0","stable_tag":"2.3.0","tested":"7.1.3","requires":"6.6","requires_php":"7.4","requires_plugins":null,"header_name":"Business Places \u2013 Opening Hours Table & Local Business Schema","header_author":"Tarosky INC","header_description":"Add open hour to any post type.","assets_banners_color":"c2ced3","last_updated":"2026-10-09 02:20:13","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/wordpress.org\/plugin\/taro-open-hour","header_author_uri":"https:\/\/tarosky.co.jp","rating":0,"author_block_rating":0,"active_installs":10,"downloads":2741,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.0":{"tag":"1.0.0","author":"Tarosky","date":"2017-06-05 05:05:52","revision":1670728},"2.0.0":{"tag":"2.0.0","author":"Tarosky","date":"2019-08-28 09:28:22","revision":2146939},"2.0.1":{"tag":"2.0.1","author":"Tarosky","date":"2019-08-30 05:53:22","revision":2148196},"2.1.0":{"tag":"2.1.0","author":"Tarosky","date":"2019-09-12 04:48:03","revision":2155253},"2.2.0":{"tag":"2.2.0","author":"Tarosky","date":"2019-10-17 10:50:59","revision":2174793},"2.2.1":{"tag":"2.2.1","author":"Tarosky","date":"2021-06-18 07:56:19","revision":2550265},"2.3.0":{"tag":"2.3.0","author":"Tarosky","date":"2026-10-09 02:20:13","revision":3735780}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":{"icon.svg":{"filename":"icon.svg","revision":3735780,"resolution":false,"location":"assets","locale":false}},"assets_banners":{"banner-1544x500.jpg":{"filename":"banner-1544x500.jpg","revision":3633781,"resolution":"1544x500","location":"assets","locale":"","width":1544,"height":500},"banner-772x250.jpg":{"filename":"banner-772x250.jpg","revision":3633781,"resolution":"772x250","location":"assets","locale":"","width":772,"height":250}},"assets_blueprints":{"blueprint.json":{"filename":"blueprint.json","revision":3735780,"resolution":false,"location":"assets","locale":"","contents":"{\"$schema\":\"https:\\\/\\\/playground.wordpress.net\\\/blueprint-schema.json\",\"meta\":{\"title\":\"Business Places demo\",\"description\":\"A dental clinic with weekly opening hours, displayed with the Open Hour and Business Place blocks.\",\"author\":\"tarosky\",\"categories\":[\"Business\"]},\"landingPage\":\"\\\/\",\"preferredVersions\":{\"php\":\"8.2\",\"wp\":\"latest\"},\"features\":{\"networking\":true},\"steps\":[{\"step\":\"login\"},{\"step\":\"installPlugin\",\"pluginData\":{\"resource\":\"wordpress.org\\\/plugins\",\"slug\":\"taro-open-hour\"},\"options\":{\"activate\":true}},{\"step\":\"runPHP\",\"code\":\"<?php\\nrequire '\\\/wordpress\\\/wp-load.php';\\n\\nupdate_option( 'tsoh_open_mark', '\\u25cb' );\\nupdate_option( 'tsoh_close_mark', '\\uff0f' );\\n\\n$post_id = wp_insert_post( array(\\n\\t'post_type'    => 'location',\\n\\t'post_status'  => 'publish',\\n\\t'post_title'   => 'Sakura Dental Clinic',\\n\\t'post_content' => 'A friendly neighborhood dental clinic.',\\n) );\\n$meta    = array(\\n\\t'address'             => '1-2-3 Sakura-cho',\\n\\t'address2'            => 'Sakura Building 2F',\\n\\t'city'                => 'Shibuya-ku',\\n\\t'state'               => 'Tokyo',\\n\\t'country'             => 'Japan',\\n\\t'zip'                 => '150-0000',\\n\\t'tel'                 => '03-1234-5678',\\n\\t'url'                 => 'https:\\\/\\\/example.com',\\n\\t'access'              => '5 min walk from Shibuya Station.',\\n\\t'local_business_type' => 'Dentist',\\n\\t'holiday_note'        => 'Closed on Sundays, national holidays, and Wednesday & Saturday afternoons.',\\n\\t'site_location'       => 1,\\n);\\nforeach ( $meta as $key => $value ) {\\n\\tupdate_post_meta( $post_id, '_tsoh_' . $key, $value );\\n}\\n\\n$model = \\\\Tarosky\\\\OpenHour\\\\Model::instance();\\n$model->clear( $post_id );\\nfor ( $day = 0; $day < 6; $day++ ) {\\n\\t$model->add( $post_id, $day, '09:00', '12:00' );\\n}\\nforeach ( array( 0, 1, 3, 4 ) as $day ) {\\n\\t$model->add( $post_id, $day, '14:00', '18:00' );\\n}\\n\\n$page_id = wp_insert_post( array(\\n\\t'post_type'    => 'page',\\n\\t'post_status'  => 'publish',\\n\\t'post_title'   => 'Clinic Hours & Access',\\n\\t'post_content' => implode( \\\"\\\\n\\\\n\\\", array(\\n\\t\\t'<!-- wp:heading --><h2 class=\\\"wp-block-heading\\\">Clinic Hours<\\\/h2><!-- \\\/wp:heading -->',\\n\\t\\tsprintf( '<!-- wp:tsoh\\\/open-hour {\\\"postId\\\":%d} \\\/-->', $post_id ),\\n\\t\\t'<!-- wp:heading --><h2 class=\\\"wp-block-heading\\\">Access<\\\/h2><!-- \\\/wp:heading -->',\\n\\t\\tsprintf( '<!-- wp:tsoh\\\/business-place {\\\"postId\\\":%d,\\\"noMap\\\":true} \\\/-->', $post_id ),\\n\\t) ),\\n) );\\nupdate_option( 'show_on_front', 'page' );\\nupdate_option( 'page_on_front', $page_id );\\n\"}]}"}},"all_blocks":{"tsoh\/open-hour":{"name":"tsoh\/open-hour","title":"Open Hour"},"tsoh\/business-place":{"name":"tsoh\/business-place","title":"Business Place"}},"tagged_versions":["1.0.0","2.0.0","2.0.1","2.1.0","2.2.0","2.2.1","2.3.0"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3735780,"resolution":"1","location":"assets","locale":"","width":1088,"height":756},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3735780,"resolution":"2","location":"assets","locale":"","width":1800,"height":1350},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3735780,"resolution":"3","location":"assets","locale":"","width":1077,"height":830},"screenshot-4.png":{"filename":"screenshot-4.png","revision":3735780,"resolution":"4","location":"assets","locale":"","width":1077,"height":1355},"screenshot-5.png":{"filename":"screenshot-5.png","revision":3735780,"resolution":"5","location":"assets","locale":"","width":1560,"height":1754},"screenshot-6.png":{"filename":"screenshot-6.png","revision":3735780,"resolution":"6","location":"assets","locale":"","width":1088,"height":515}},"screenshots":{"1":"Opening hours table on the front end, rendered by the Open Hour block. Marks for open and closed cells are customizable.","2":"Open Hour block in the block editor. Choose which business place to display from the block sidebar.","3":"Enter weekly time shifts and holiday notes in the Open Hour meta box.","4":"Location settings: address, access information, and the business type (Schema.org) used for structured data.","5":"Settings &gt; Business Places: post types, default time shifts, default open days, and open\/closed marks.","6":"Business Place block showing the name, address, access information, and contacts."}},"plugin_section":[],"plugin_tags":[12431,1571,37556,15082,1121],"plugin_category":[39,43],"plugin_contributors":[83237,142014,242585],"plugin_business_model":[],"class_list":["post-69452","plugin","type-plugin","status-publish","hentry","plugin_tags-business-hours","plugin_tags-google-maps","plugin_tags-local-business","plugin_tags-opening-hours","plugin_tags-structured-data","plugin_category-business","plugin_category-customization","plugin_contributors-takahashi_fumiki","plugin_contributors-tarosky","plugin_contributors-tswallie","plugin_committers-takahashi_fumiki","plugin_committers-tarosky"],"banners":{"banner":"https:\/\/ps.w.org\/taro-open-hour\/assets\/banner-772x250.jpg?rev=3633781","banner_2x":"https:\/\/ps.w.org\/taro-open-hour\/assets\/banner-1544x500.jpg?rev=3633781","banner_rtl":false,"banner_2x_rtl":false},"icons":{"svg":"https:\/\/ps.w.org\/taro-open-hour\/assets\/icon.svg?rev=3735780","icon":"https:\/\/ps.w.org\/taro-open-hour\/assets\/icon.svg?rev=3735780","icon_2x":false,"generated":false},"screenshots":[{"src":"https:\/\/ps.w.org\/taro-open-hour\/assets\/screenshot-1.png?rev=3735780","caption":"Opening hours table on the front end, rendered by the Open Hour block. Marks for open and closed cells are customizable."},{"src":"https:\/\/ps.w.org\/taro-open-hour\/assets\/screenshot-2.png?rev=3735780","caption":"Open Hour block in the block editor. Choose which business place to display from the block sidebar."},{"src":"https:\/\/ps.w.org\/taro-open-hour\/assets\/screenshot-3.png?rev=3735780","caption":"Enter weekly time shifts and holiday notes in the Open Hour meta box."},{"src":"https:\/\/ps.w.org\/taro-open-hour\/assets\/screenshot-4.png?rev=3735780","caption":"Location settings: address, access information, and the business type (Schema.org) used for structured data."},{"src":"https:\/\/ps.w.org\/taro-open-hour\/assets\/screenshot-5.png?rev=3735780","caption":"Settings &gt; Business Places: post types, default time shifts, default open days, and open\/closed marks."},{"src":"https:\/\/ps.w.org\/taro-open-hour\/assets\/screenshot-6.png?rev=3735780","caption":"Business Place block showing the name, address, access information, and contacts."}],"raw_content":"<!--section=description-->\n<p>Show your business hours as a <strong>weekly opening hours table<\/strong>: time slots as rows, Monday to Sunday as columns, and a mark in every cell where you are open.\nAdd the table with a block, a widget or a shortcode, and output <strong>LocalBusiness structured data (JSON-LD)<\/strong> with <code>openingHoursSpecification<\/code> for search engines.<\/p>\n\n<p>Formerly known as \"<strong>Taro Open Hour<\/strong>\".<\/p>\n\n<h4>Who is it for?<\/h4>\n\n<ul>\n<li><strong>Clinics, dental offices, osteopaths and pharmacies<\/strong> that publish consultation hours.<\/li>\n<li><strong>Beauty salons, hair salons and spas.<\/strong><\/li>\n<li><strong>Shops, caf\u00e9s and restaurants<\/strong> with one or several branches.<\/li>\n<li><strong>Directory sites<\/strong> (e.g. a database of gyms) where every post is a place with its own hours.<\/li>\n<\/ul>\n\n<p>It fits the Japanese-style consultation hours table (\u8a3a\u7642\u6642\u9593\u8868), e.g. \"9:00\u201312:00 \/ 14:00\u201318:00\" rows with \u25cb for open and \u00d7 or \uff0f for closed.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li><strong>Opening hours table<\/strong> \u2013 Add any number of time slots (e.g. 9:00\u201312:00 and 14:00\u201318:00) and tick the weekdays each slot is open.<\/li>\n<li><strong>Selectable marks<\/strong> \u2013 Choose the open mark (\u2713 \u25cb \u25cf \u25ce \u2714) and the closed mark (- \u00d7 \u2715 or blank), or enter custom text, at <code>Settings &gt; Business Places<\/code>.<\/li>\n<li><strong>Holiday notes<\/strong> \u2013 Add a note such as \"Closed on Sundays and public holidays\" below the table.<\/li>\n<li><strong>Blocks<\/strong> \u2013 \"Open Hour\" and \"Business Place\" blocks for the block editor.<\/li>\n<li><strong>Widgets and shortcodes<\/strong> \u2013 <code>[open-hour]<\/code> and <code>[business-place]<\/code>, also usable in block themes.<\/li>\n<li><strong>Business places<\/strong> \u2013 Address, access information, phone, email and URL, with a Google Maps embed.<\/li>\n<li><strong>Local Business schema<\/strong> \u2013 JSON-LD with a selectable schema.org type (MedicalClinic, Dentist, BeautySalon, Restaurant, Store, etc.), address and opening hours.<\/li>\n<li><strong>Multiple places<\/strong> \u2013 Use the built-in place post type or any post type you choose; mark one place as the site's main location.<\/li>\n<\/ul>\n\n<h4>Case Study<\/h4>\n\n<p>Case 1<\/p>\n\n<p>If your site is for your bookstore, add your store's location as a business place.<\/p>\n\n<p>The location and opening hours are available via widgets.<\/p>\n\n<p>Case 2<\/p>\n\n<p>If your site is a database of bouldering gyms, choose a post type to be treated as a location.<\/p>\n\n<p>Each single page will have its own place and opening hour information.<\/p>\n\n<h4>How to display<\/h4>\n\n<p>Blocks<\/p>\n\n<p>In the block editor, you can use \"Open Hour\" and \"Business Place\" blocks.\nChoose a place in the block settings. If empty, the current post or the site location is used.<\/p>\n\n<p>Widgets<\/p>\n\n<p>You can use widgets for opening hours and business locations.<\/p>\n\n<p>Shortcodes<\/p>\n\n<p>You can use the shortcode <code>[open-hour]<\/code> for the time table. If you are a theme developer,\njust use the <code>tsoh_the_timetable()<\/code> function.<\/p>\n\n<p>For business places, you can use <code>[business-place post_id='10']<\/code>.\nThe attribute <code>post_id<\/code> can be omitted and its default value is the current post.<\/p>\n\n<h4>Acknowledgements<\/h4>\n\n<ul>\n<li>Banner images are a derivative of the work of the Geospatial Information Authority of Japan.<\/li>\n<\/ul>\n\n<h3>Customization<\/h3>\n\n<p>Here is a list of customizations.<\/p>\n\n<h4>Change Style<\/h4>\n\n<p>If you have <code>tsoh-style.css<\/code> in your theme folder, it will be used.\nChild theme supported.<\/p>\n\n<p>We also have filter hook <code>tsoh_stylesheet<\/code>. Below is the example to change css url.<\/p>\n\n<pre>&lt;?php\n\/\/ Change css path.\nadd_filter('tsoh_stylesheet', function($style){\n    $style = [\n        'url'     =&gt; get_stylesheet_directory_uri() . '\/assets\/css\/table.css',\n        'version' =&gt; wp_get_theme()-&gt;get('Version'),\n    ];\n    return $style;\n});<\/pre>\n\n<p>If you return <code>false<\/code> from the filter hook, no style will be loaded.<\/p>\n\n<h4>Change table markup<\/h4>\n\n<p>The table's template is located at <code>taro-open-hour\/templates\/time-table.php<\/code>.\nCopy it to <code>your-theme\/template-part\/tsoh\/time-table.php<\/code> and change the markup.<\/p>\n\n<p>Of course, you can change the template path with a filter hook.<\/p>\n\n<pre>\/\/ e.g. If post type is event, change template from default.\nadd_filter( 'tsoh_timetable_template_path', function( $path, $post ) {\n    if ( 'event' == $post-&gt;post_type ) {\n        $path = get_template_directory() . '\/templates\/yours\/event.php';\n    }\n    return $path;\n}, 10, 2 );<\/pre>\n\n<!--section=installation-->\n<ol>\n<li>Upload the plugin files to the <code>\/wp-content\/plugins\/taro-open-hour<\/code> directory, or install the plugin through the WordPress plugins screen directly.<\/li>\n<li>Activate the plugin through the 'Plugins' screen in WordPress.<\/li>\n<li>Go to <code>Settings &gt; Business Places<\/code> and set it up.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20can%20i%20display%20opening%20hours%20or%20places%20with%20a%20block%20theme%3F\"><h3>How can I display opening hours or places with a block theme?<\/h3><\/dt>\n<dd><p>Block themes have no widget areas. Add a Shortcode block and enter <code>[open-hour]<\/code> for the time table or <code>[business-place]<\/code> for the place information. Both accept the <code>post_id<\/code> attribute (default: the current post), e.g. <code>[business-place post_id='10']<\/code>.<\/p><\/dd>\n<dt id=\"how%20do%20i%20make%20a%20clinic%20hours%20table%20with%20%E2%97%8B%20marks%3F\"><h3>How do I make a clinic hours table with \u25cb marks?<\/h3><\/dt>\n<dd><ol>\n<li>Go to <code>Settings &gt; Business Places<\/code> and choose \"\u25cb\" as the open mark and \"\u00d7\" (or a custom text such as \"\uff0f\") as the closed mark.<\/li>\n<li>Edit the place (or the post) and add time slots such as <code>9:00\u201312:00<\/code> and <code>14:00\u201318:00<\/code>.<\/li>\n<li>Tick the weekdays each slot is open, e.g. leave Saturday afternoon and Sunday unticked.<\/li>\n<li>Enter \"Closed on Sundays and public holidays\" in the holiday notes.<\/li>\n<li>Add the \"Open Hour\" block (or the <code>[open-hour]<\/code> shortcode) where you want the table.<\/li>\n<\/ol><\/dd>\n<dt id=\"which%20schema%20type%20is%20output%3F\"><h3>Which schema type is output?<\/h3><\/dt>\n<dd><p>The JSON-LD uses the \"Business Type\" field of each place's location settings as <code>@type<\/code>.\nChoose a <a href=\"https:\/\/schema.org\/LocalBusiness#subtypes\">schema.org LocalBusiness subtype<\/a> such as <code>MedicalClinic<\/code>, <code>Dentist<\/code>, <code>HairSalon<\/code>, <code>Restaurant<\/code> or <code>Store<\/code>; common types are suggested as you type.\nIf the field is empty, <code>LocalBusiness<\/code> is used. Developers can change the default with the <code>tsoh_default_local_business_type<\/code> filter (and the final value with <code>tsoh_local_business_type<\/code>).<\/p><\/dd>\n<dt id=\"how%20can%20i%20contribute%3F\"><h3>How can I contribute?<\/h3><\/dt>\n<dd><p>Please create an issue on <a href=\"https:\/\/github.com\/tarosky\/taro-open-hour\/issues\">GitHub<\/a>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>2.3.0<\/h4>\n\n<ul>\n<li>Add blocks: \"Open Hour\" (time table) and \"Business Place\" (location card). They also work in block themes without widget areas.<\/li>\n<li>Open\/closed marks of the time table are now selectable in Settings &gt; Business Places (\u2713 \u25cb \u25cf \u25ce \u2714 \/ - \uff0f \u00d7 \u2715 or custom text), with screen reader text.<\/li>\n<li>Business type can be picked from common LocalBusiness subtypes (MedicalClinic, Dentist, BeautySalon...).<\/li>\n<li>Location widget can hide the map and access information. Widgets are renamed to \"Business Places: ...\" for clarity.<\/li>\n<li>Security: REST API endpoints now require the <code>edit_posts<\/code> capability and return only necessary fields.<\/li>\n<li>Bugfix: fatal error of <code>tsoh_is_open()<\/code>. <code>tsoh_current_time_condition()<\/code> is deprecated.<\/li>\n<li>Bugfix: theme override path <code>template-part\/tsoh\/time-table.php<\/code> was not detected.<\/li>\n<li>Bugfix: \"No post type is specified\" notice was shown even when business places were available.<\/li>\n<li>Bugfix: database table schema caused SQL errors on update. Tables are dropped when a site is deleted on multisite.<\/li>\n<li>Bugfix: PHP warning in JSON-LD when only the second address line was set.<\/li>\n<li>Bugfix: time table overflowed narrow content areas.<\/li>\n<li><code>$timestamp<\/code> arguments of <code>tsoh_get_timetable()<\/code>, <code>tsoh_is_open()<\/code> and <code>[open-hour]<\/code> are now real Unix timestamps (<code>wp_date()<\/code> is used).<\/li>\n<li>JSON-LD uses <code>https:\/\/schema.org<\/code>.<\/li>\n<li>Requires WordPress 6.6 and PHP 7.4 or later. Tested with PHP 8.5.<\/li>\n<\/ul>\n\n<h4>2.2.1<\/h4>\n\n<ul>\n<li>Map iframe is now <code>loading=\"lazy\"<\/code><\/li>\n<li>Fix admin link.<\/li>\n<\/ul>\n\n<h4>2.2.0<\/h4>\n\n<ul>\n<li>Add widgets for place and time table.<\/li>\n<li>Drop support for WordPress 4.8 and below.<\/li>\n<\/ul>\n\n<h4>2.1.0<\/h4>\n\n<ul>\n<li>Add shortcode <code>business-place<\/code>.<\/li>\n<li>Add filter and action hooks.<\/li>\n<\/ul>\n\n<h4>2.0.1<\/h4>\n\n<ul>\n<li>Bugfix: version number changed.<\/li>\n<\/ul>\n\n<h4>2.0.0<\/h4>\n\n<ul>\n<li>Change plugin name.<\/li>\n<li>Add location feature.<\/li>\n<li>Add widgets.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Weekly opening hours table block for clinics, dentists, salons and shops, with custom marks (\u2713 \u25cb \u00d7), Google Maps and LocalBusiness schema.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/69452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=69452"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/tarosky"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=69452"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=69452"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=69452"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=69452"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=69452"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=69452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}