$open = "our lines are open";
$closed = "our lines are closed";
if ( time() >= strtotime( '09:00:00' ) && time() <= strtotime( '17:00:00' ) ) {
echo $open;
} else {
echo $closed;
}
Somethinh like this should help you.
Related Posts:
- start_lvl Ignored in Custom walker_nav_menu
- Enforcing password complexity
- Customize default settings on new sites on multisite
- Check if a menu is empty?
- Dynamically change feature image in customiser
- Creating wordpress user registration form
- Remove class that has been added by parent theme
- Get the title before comma
- category not display in word press grammatically
- Setting up the child theme so as to enable right-to-left WordPress?
- Design view breaking on Pages
- Getting a fatal error while updating
- Hooking new functions to actions + passing parameters
- Display 4 chronological posts starting with a random post
- my function doesn’t return my post from today
- Replace comment avatars and links at the same time
- How to break down importing of feeds
- Create Logout Link WordPress Admin Menu
- get_the_terms – only top level
- Have CSS Class Added with `is_page()` WP function
- Slide in Panel WordPress Post
- Use wp_get_recent_posts with search term
- Calculations in functions.php [closed]
- comments_number display outside specified span
- Choose To Display Post Views With An Options Panel
- Prevent Data Resubmission On Page refresh
- Get_avatar filter?
- Passing the custom field values in the wp_get_current_user array function
- Get value from shortcode to do something
- PHP 8, AJAX mail form to function.php doesn’t work
- Ajax request not sending to server and returning – wp-admin/admin-ajax.php 400
- Error in custom php function doesn’t exist
- How to create a php variable using WordPress the_title() function
- Can’t find infinite loop cause
- how to make custom ajax handler?
- How to disable controls in theme customizer?
- register_taxonomy() take much queries
- is there a benefit in using a constant over get_stylesheet_directory_uri?
- WooCommerce Tabs [closed]
- Shortcode with PHP issue “Undefined index”
- Override a function defined in wp-includes/comment-template.php
- Show meta box only for default page template
- ::before on open/close function [closed]
- REQUIRED: get_bloginfo(‘template_url’) was found in the file search.php. Use get_template_directory_uri() instead
- How to check if a PHP string is different than meta field?
- Is it possible to define variables in a wordpress shortcode, and then call the shortcode using a specific variable?
- Displaying posts based on category
- Countdown to date function?
- Creating a mobile site by adding a new class to the body tag from functions.php
- calling a custom field value inside functions.php
- Custom meta box values are not getting saved for my custom post type
- Export Form Data to a CSV then send it as an attachment – contact form 7
- Issue with fetching mysql data and displaying results via shortcode in webpage
- Noindex Posts From Certain Authors In WordPress
- Show all tags within a category?
- Removing “Powered by” footer using child theme PHP [closed]
- Overide Variable in Child Theme
- child parent styles enqueue order
- Add URL parameter to all internal links using a specific theme
- How to style injected code in header section?
- Randomize Color Scheme Selection in Theme
- Include a file that has a function in it
- Execute Jquery when a specific page in my plugin is loading
- AJAX function not working [closed]
- SQL error with custom query
- Products listing check if meta checkbox is checked
- How to preload header logo image in WordPress? like what’s the code and where do I put it?
- Contain multiple page templates in one PHP custom template file in WordPress?
- How do I reopen the (Popup Maker) after entering the correct password for a password protected page?
- Display metabox galleries on specific page template in admin editor
- display condition based on post term and status
- Only the first image uploads
- require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality
- Custom plugin: how do I call a PHP file if settings option is set to true?
- removing the standard dashboard widgets in WP so I Can replace with custom
- Gravity Forms: How to add PHP function to confirmation conditional shortcode?
- wpdb->query returns different value to phpMyAdmin
- Edit a function to take different actions based on user role
- How to put 2 php codes in functions.php without site crashing
- How to change order inside foreach using wp_enqueue_script?
- Change header on one page in WordPress
- How do I get the value of a current user’s custom field?
- Adding extra data to shortcode attributes and pass it to JS with wp_localize_script
- Allow Comments by Default for Multiple Post Types
- Cleaner ‘for each’ loop for registering scripts in functions.php
- How do I make comment-reply-button with that takes to comment reply form on click
- How to get User Avatar Image with link to Author and User name in Html Title tag?
- WP HTTP API call response
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- How to get all users by user_login as a json_encode array?
- Private messaging – Getting and displaying the avatar/url of a message recipient
- Allow BBPress participant role to trash topics
- Postmeta not saving
- Fix My Custom Function: Remove Automatic
- Hide the content before the more tag in the “single page”
- Replace TinyMCE with Custom Built Editor
- WP Debug enabled Undefined index error in a widget
- Particular meta tag – viewport – insertion when dealing with plugin
- how to loop through blog posts in php
- how to create twitter card without plugin in wordpress website?