Non-global header for password page

Hi there,

I’m using Pro on a site and have a global header and then another header I assign to pages where the global header design doesn’t work. However I can’t seem to be able to assign my preferred header to the wordpress password protected page, can you give me some help here?

Hey Kelly,

I’ve tested assigning a header to a password protected page and it works in my test site. I’m using the latest version of WordPress and Pro. If you’ve not updated to the latest version of WordPress and Pro yet, please update them first then test again. You can see the latest version of Pro in our Changelog:

Another possibility is that a third-party plugin is modifying the behavior of a password protected page. You can test this by deactivating all third-party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If neither of those work, please make a staging copy of your site and give us the staging site’s WordPress Login URL, Admin Level Username and Password and also FTP access in a Secure Note.


Thanks for the reply, Pro is up to date. Haven’t been able to apply a header as you say to the password page.

Please see secure note for login details

Hi There,

Yes, I can see the issue it is missing on the assignment page for header. Although, it is missing too on the pages list on Admin > Pages. What kind of page is this? Is this pages generated by a plugin?

Hi there,

the “how we work” page is only on the live site. However has the same password error as the home page on the staging site.

If you go to Admin > pages and then home page you can see that the home page is a normal wordpress page, created by adding a page from the wordpress dashboard, and then the page has been edited with Pro.

However I want to define a header to be used on any pages that have passwords on it. How can we do this?

Hey Kelly,

There’s currently no option to detect password protected pages but you can follow this tutorial from Michael:

The conditional that you need to use is post_password_required

Here’s a sample code which is actually working in my test site. Remember to change the header ID.

add_filter('cs_match_header_assignment', 'custom_search_header');
function custom_search_header($match) {
	if (post_password_required()) {
		$match = 14; // the post ID for your header
	return $match;

Please just note that what I provided is a sample. That code will not be supported in case it will not work in your site nor can we provide enhancements for it.

Hope that helps.

Hi there,

Understood, and thank you for the resources. We will try this.


You’re welcome, Kelly.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.