You can use http://php.net/manual/en/function.http-response-code.php to set the response header, and you just need to find the lines in the theme’s header.php. Unfortunately, these items are set by header.php so you will have to run the code on all pages of a traditional theme, but I would do something in the header.php near where the meta is currently being set like
if ( is_tag() ){
// check for how many posts are in the loop here and save as number
}
if (is_tag() && $number < 3){
//change meta here, change http response code here
}
else{
// normal meta here, normal response code here
}
Related Posts:
- How can I allow commas in tag names?
- How to customize woocommerce related products? [closed]
- How to not allow users to create new tags, but allow to them to use existing ones
- Plugin to restrict non-admin user to existing tags
- Tag selector like stackexchange?
- Tag link suggestion plugin
- How to add tags in Submenu page or Menu page
- how to add text to posts from tags
- WordPress “Categories to tags converter” not working. Pointing to import.php instead
- the_tags : can we insert a class
- Set post tags using tag ID
- How to transfer data from an additional field in the tags?
- WordPress “Add new tag” button is not working
- Get Page URI for QR Code PHP [closed]
- Is there any necessary to use tag plugins like simple tagging in wordpress 3.0+
- how to create hierachial taxonomy and manage under single post type?
- Best approach to make all tags searchable by the wordpress search function
- add tags to wordpress post using REST API
- I want to display “how many times this tag used in WordPress?”
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Exclude Tag Links from and Text
- How to change the product short description for each product with PHP?
- AddThis Plugin adding html comments in P tags
- Find all strings between an enclosing shortcode
- Trending Tags based on post views
- Multiselect value in wp_query
- Strip shortcode from excerpt [duplicate]
- WordPress “Categories to tag converter” not working on imported Blogger posts
- Customize Multi-Column Tag Map to fetch specific post-type
- how to add “alt” for all image in wordpress
- Fetching Video From YouTube Automatically [closed]
- Real estate schema markup not showing up on Rich Results test
- How to export post tags from wordpress
- Passing a parameter to filter and action functions
- Do deactivated plugins slow down a WordPress site?
- Update plugin from personal API
- Enabling free shipping on Woo Commerce by specific items [closed]
- Symlinked plugin directory doesn’t appear in Admin
- How to install plugins in individual sites on a wordpress network?
- Get Latest Plugin Version from WP API
- How do I change the description of the same image which is to be found in multiple instances?
- How to get all attachment image from post ?? WordPress
- How to improve WordPress search
- Language Translation is not working?
- Enable/Disable WP options programmatically
- Could not create directory
- Hook before & after plugin / core update
- Getting user roles in plugin files
- Plugin and theme script load order
- How to import featured image using WP Rest API from another WP installation
- Shortcode button dosent work for all posts. Work for first post only
- Single central login for front end users from any site
- Plugin stable tag on wordpress.org not updating
- Plugin Handle URL With Custom Theme
- how to disable blockrenderAppender inside all Innerblocks?
- auto populate list of questions if user select a category xyz
- Change commission_status paid when withdraw_status vendor is completed
- Grab WordPress Salt Data From URL
- Unable to get WP_DEBUG, WP_DEBUG_DISPLAY, WP_DEBUG_LOG to work
- Gutenberg: Block SelectControl saves attributes but after a reload of Gutenberg it loads its defaults. Why?
- Proper way to replace the_content only for pages created by custom plugin
- Add category selection to custom post type (plugin)
- How to install plugin only from PHP file?
- Show author on every sub-page
- Only allowing some emails to create an account [closed]
- AJAX on Front-End Button Click not working – Custom Plugin
- WordPress Book Exchange Plugin Equivalent?
- Get ‘Headers already sent’ error for the plugin I am creating when I try to login
- Plugin to email a post or page to someone
- Return multiple values in a shortcode attribute
- How to extract a .wp-env.json or composer.json containing plugin versions from a production website?
- Search and Filter Plugin – How to disable redirection
- Make plugin php file called directly aware of WordPress?
- Using $wpdb in a plugin, what sort of data does it return?
- WordPress’s is_plugin_active_for_network function not working for multisites
- Next Previous Post in wordpress with previous / next link with title?
- How to use existing hook in twentytwelve to all theme of wordpress?
- WordPress get the latest plugin installed details
- Plugin error after installation
- How to translate to spanish wordpress hardcoded content/files?
- Is there a tool to see every WordPress site that’s using a particular plugin?
- what functions to use to resize images and create DB metadata for them after/during upload?
- How to Create a Learning Management Plugin in WordPress to Manage Courses [LMS]
- Overwriting Plugin’s Ajax callback function from theme
- How to disable users to view Other pages
- How can I get the Post ID and Post Type within a Must Use Plugin?
- Can’t find variable is_single in my jQuery plugin
- WordPress Cron function is not working
- How to do rest APi with wordpress
- SSH vs WordPress
- WordPress Dashboard organize posts based on categories
- Plugins upload to wordpress in wampserver via filezilla
- Having trouble initializing wordpress within plugin
- Get content or excerpt of top rated votes @GD-Star Rating? [closed]
- Is an Office a custom post type [closed]
- What is the best way to change share image for social networks? [closed]
- Duplicator live to wamp https to http
- I am experiencing difficulty fulfilling client request
- PHP Creating a formula from mysql db values and db stored math operator
- Hidden Elementor sections slow down website. How to fix this? [closed]