Password protecting the wp-content maybe not a good idea and may break your site interface.
If you want the images are not displayed in google search
Create a Robot.txt file in your root directory in hosting and add the code below.
User-agent: *
Disallow: /wp-admin/
Disallow: /wp-content/
or below if you want to not specific images
User-agent: Googlebot-Image
Disallow: /images/yourImageName.jpg #yourImageName.jpg image for Googlebot
specifically.
Blockquote
add_action( 'wp_head', function() {
if ( is_page( 'your_page_name' ) ) {
echo '<meta name="robots" content="noindex">';
}} );
your specific page will be not index by Google
Or you can pick plugin of your choice from here. It is a preferable method but you have to find some free plugins for content restriction.
Related Posts:
- How do I email a new page password to somebody every month?
- Add new password rule to Ultimate Member register form
- login to wordpress with Get variables instead of Post
- Multiple Password Portal Page BEFORE User Account Set Up
- Is it possible to block subscriber users to changing its password?
- Problem protecting a page with a password
- How to create a word press user with hashedpassword
- Is there any good tutorial to write custom login, registration and password recovery forms? [closed]
- Disable WordPress password reset via mails,instead notify admin about the reset request
- Preventing BFA in WordPress without using a plugin
- How to delete Passwrd Protected posts cookies when a user logged out from the site
- Completely disabling password reset/recovery
- Specific way to allow WordPress users to view their current password? And edit it?
- Plugin: connect to external database without showing password
- Create Woocommerce account password post-checkout on thank you page
- Automatic chage password of pages after some time
- wp_set_password() does not work!
- Login/password protected “client page”
- Login issue in WordPress
- How to make a page both “private” and “password protected”
- Members-only page, but accessible via sharable link
- Create password protected page, no registration
- Cant visualize protected password portfolio elements
- How can I allow for the password protect feature to allow visitors to enter any number at all?
- Alter the reset password link
- Password Protected Directory Link Shows Maintenance Mode Page
- Is it possible to send user new password after they clicking on forgot password in word press
- My WP site and password was hacked, what to do? [closed]
- How to delete Password Protected posts cookies when a user logged out from the site
- How to structure a plugin
- Getting Path To Uploaded Attachment Image After Upload
- Error when updating plugins by FTP “Unable to locate WordPress Content directory (wp-content).”
- Plugin stability | Using a plugin VS Developing functionalities yourself
- Oauth user Authorisation [closed]
- Building a scalable WordPress favouriting plugin – one serialised meta value array or many meta records
- Top 3 posts in last week ordered by Facebook and Twitter share counts
- titles in recent posts appear together in all languages with qtranslate
- Why is the unrendered widget number `__i__` showing up in the JavaScript but not in the HTML?
- An Unexpected HTTP Error occurred during the API request
- Multiple plugins using the same OAuth class issues
- Survey plugin recommendations [closed]
- How can I use a video header that’s over 8MB?
- Prepare plugin options for multi-lingual support
- A very basic question – how to properly use wp_mail() in a plugin
- Show a special message for private page?
- How to use get_theme_mod in gutenberg editor wordpress?
- Correct way to perform non-cacheable DB query
- Category’s Description field as editor remove tag
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Calling an attribute from a plugin shortcode
- WordPress continually requests pages from itself
- Enabling user creation with ” Active Directory Integration”
- URL parameters causing 404 on home page, but nowhere else
- Custom message on plugin uninstall
- Create shortcode to echo javascript
- Events Manager plugin – booking form required fields
- Need to replace Currency Shortforms
- How to create plugin in wordpress [closed]
- How to use custom Javascript code inside a plugin?
- 2 wordpress site same database
- Executing Javascript in Plugin
- How do i ‘deactivate’ a plugin only on a certain page template?
- WordPress plugin for Limited days user
- Running a function with args in add_action()
- Custom Caption on WP Nivo Slider
- Javascript console errors and WSOD on edit post pages
- Order by post_date does not work in Previous and Next post pagination
- Adding LOAD MORE on a page
- Make modification of add_to_cart button specific to single page
- Discern a specific plugin’s action hooks
- How to get the checkout form data from checkout page when place-order button is clicked
- Is there a request for products plugin for WooCommerce
- Custom Field used to allow a Free Story; no longer works
- Using Filters to modify contect – DB query results alwats appear fist
- Site navigation from Google not using HTTPS for some resources, causing redirect loop
- Object of class WP_Error could not be converted to string in /formatting.php
- Ajax call to php function doesn’t work PHP code
- On save_post need to wp_insert_post and save partent post id to child post and child post id to parent post
- Overwrite a file with the content of a textarea
- How to access classes in theme of a plugin?
- Cookie set in a plugin visible in admin but not on front
- Team member plugin problem after changing to another hosting
- AJAX login without a plugin does not work. when add a action to function.php
- How do i get all author posts on custom post type list
- Serialize $_POST global in wordpress
- Plugins not activated after update?
- Displaying image from a repeatable group
- Submit form stored in one plugin from another plugin?
- WooCommerce – how to display product category above product with full details
- Overwrite CSS of Instaemail plugin popup
- How to add character to content of post?
- Trending Topics Plugin
- Building custom pages with a video player
- Trouble After Update, Removing Plugin
- Move related products after product summary? [closed]
- Get ID of a NextGen album that is linked to a subpage [closed]
- Trying to insert a row from a Plugin
- Use a WordPress Plugin in non-WordPress .php page [closed]
- Cannot modify header information – headers already sent by
- How can I get information on who is downloading my plugin? (new to this)