Drop this into the file that is displaying the date (assuming you are using get_the_date):
$month = date( 'F' );
$categoryIds = array();
$bannedMonth="September";
$bannedCategory = 13;
$categoryArray = get_the_category();
foreach ( $categoryArray as $categoryObj ) {
array_push( $categoryIds, $categoryObj->term_id );
}
if ( $month != $bannedMonth && !in_array( $bannedCategory, $categoryIds ) ) {
echo get_the_date();
}
Related Posts:
- How do I only load a plugin js on it’s settings pages?
- AJAX Call Via Vanilla JavaScript In WordPress Plugin Development
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to Reload the Dashboard After Clicking Update in Quick-Edit?
- Ajax call doesn’t work in frontend but it’s working in backend (when I’m logged in)
- Dequeue / Deregister script and replace it with a new plugin
- Insert code after tag without using functions.php?
- How do I use WordPress PHP functions in my Javascript code?
- Passing select control value to block
- How to create popup same as wordpress popup feature
- Has anyone used require.js for handling plugin scripts?
- Passing RichText attributes to function onChange
- How do I store information in a dynamic block in WordPress?
- How to load plugin after page is loaded – pagespeed issues
- Get IDs of Images from Gallery Block in InnerBlocks of a Custom Gutenberg Block
- React JSX in WordPress Plugin Development
- Pulling data from custom plugin settings using PHP shortcode and Javascript
- Best approach to fetch data from wp options to js file or php file
- Updating the Drag-To-Share eXtended share URLs?
- Enqueue WordPress plugin scripts below all other JS
- How to add Internationalization in WordPress using Javascript/React?
- wp.media javascript issue with on select
- How can I remove the WordPress-Version (?ver=5.x) from my plugin
- Redirect to another page using contact form 7? [closed]
- Delay JavaScript files from loading
- How to generate an all in one WordPress New content, plugin and theme update report on a website? [closed]
- How to use custom Javascript code inside a plugin?
- how to request a script more than once in wordpress
- Set Button in PluginDocumentSettingPanel Content (WordPress Gutenberg)
- Fixed: Console.log twice in the edit function
- Cannot run script properly with my custom plugin
- Add style to body based on url
- How to properly enqueue jQuery knob on WordPress without conflict?
- Problem with wordpress has_action() function
- Multiple image selection custom widget
- Create a form and have custom menu display based on user answers?
- AJAX update fails for public/non-admin users
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- How to use information from the database in the front-end?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- How to pass value from WordPress to Javascript
- Javascript in plugin not working
- How to limit each front-end user to view just his own uploaded files on Amazon S3?
- Creating a user ‘add custom field’ section
- Ajax, jQuery and WordPress
- Plugin – including external javascript calling google maps
- get_option include in my adsense
- Is it possible to run javascript on plugin deactivated?
- Ajax in Plugins: returns the whole page
- Load css classes after using ajax calls
- How to create post comparison in wordpress
- How to access values from your own settings page in javascript?
- Vanilla javascript in custom gutenberg block not working
- Custom admin column disappearing when using Quick Edit [duplicate]
- Create page when plugin is activated
- How can I translate the name of my Plugin for other languages?
- How can I filter blog name?
- Logs to check when the plugin was first installed for the first time
- How can I make the “Preview Post” button save and preview in the same window?
- How do I add a custom sub menu menu under Woo-commerce marketing?
- Making a Template for a CPT created by a plugin
- Woocommerce dependent plugin
- External CSS in WordPress Plugin [closed]
- User Session and Stored Cookies not get removed
- get 404 when accessing wp-admin/plugin-install.php
- Woocommerce Minimum Price for a Composite Product to add in cart
- Advanced AJAX Page Loader ignores other JS code
- WordPress 3.8.3. custom theme – sliders won’t load js/css files
- Plugin Development Form Self Submission
- How To Extend A WordPress Plugin Without Losing Your Changes [duplicate]
- WPDB: Update table
- Why is my custom post type not being activated on plug-in activation?
- Check filter defined or not?
- Built a second plugin but it overwrote the first one
- Custom Post Type template for homepage
- How can i export and import my plugin option WordPress
- Remove all messages, when untrash a post
- Help to Create a Simple Plugin to make a post
- How to resolve warning for `unstableOnSplit` prop on a DOM element in block editor
- Rename a folder via HTML POST request
- How can I add a custom Javascript snippet to display my feedback in footer?
- add tags to wordpress post using REST API
- path of wp-content directory when we are on some plugin
- how to do Thematic like this website using wordpress?
- How to solve Blocked a frame with origin from accessing a cross origin frame error in wordpress?
- Add Custom Field to Post Pages via Plugin
- Timing issue with is_amp_endpoint()
- Can I add content before post content without using the_content filter
- what is the best way to create a premium plugin while also protecting your code
- hide load more button if there are no posts left to display
- Input gets deleted/overwritten after changing to different Admin Menu
- How can I use multi Media Uploader in a plugin?
- Gutenberg: Dynamic Block – Show saved data in the editor
- How to fix ‘Call to undefined function do_settings()’ error?
- How do I set register_meta for a specific CPT?
- How to Enfroce Domain Licensing Limits? [closed]
- How can I save the selected page in the dropdown after anyone clicks on Save Changes?
- Update Content for a Custom Block Toolbar Button
- Submitting form to admin-post.php WordPress
- WordPress Throwing Deprecated Errors on its own Files