Conditions > "Entire site" not applying to a specific Post type

Hi!

I am not sure if this is a Plugin issue or a Pro issue.

On this website: https://www.discoverplitvice.com/, I have the Web 2.0 Directory Plugin installed.

It creates location listings.

I have two headers: One is absolutely positioned to be applied on all Pages (Post Type > is > Page), where a Hero image is going under the header.

The rest of the site, including the Blog and all the Directory listings should have the relatively positioned Header that goes above the content. (Entire Site).

If I apply that header to the entire site, Listings are not being affected, so they have the other, Post type > Page header is applied to them.

I would apply the header specifically to directory listings, but it is not present on the assignment list.

Here is an example of a directory listing: https://www.discoverplitvice.com/poi/curcic-milan-rada-guest-house/

I do notice that the Post type Directory listing is outputting the Page class. Is this their error?

Thank you!

Hello @Misho,

Thanks for writing in!

The priority of the Page header is 10 and the global header is 20. In most cases, the page header will override the global header. You may also add another condition group for your directory which will force the directory listing page to display the main header.


Hope this helps.

Hi,

unfortunately, there is no combination that works. It all looks correct inside the Header builder, but on the front end I cannot get one header to show up on the Directory listings, and the other on the Pages.

When I inspect W2D Listing post, it has the class Page on it.

<body class="page-template page-template-template-blank-1 page-template-template-blank-1-php page page-id-4360 logged-in admin-bar no-customize-support w2dc-body w2dc-directory-1 x-renew x-child-theme-active x-full-width-layout-active x-content-sidebar-active pro-v4_0_11 cornerstone-v5_0_11">

This seems to be abnormal, and could be the cause of the issue?

Hey @Misho,

You need to mind the priority as also said by Ruenel previously. Your Entire Site header must be prioritized (lower number).

image

image

image

Hope that helps.

@christian, sure, but it isn’t working.

For example, the Header for the Homepage and pages (Main Header - Absolute), does have higher number and it does show up correctly when editing the Header. However, it is not the correct one on the front-end.

No mater which combination of priorities and assignments I have, it is not working on the front-end.

Thanks!

Hi @Misho,

The priority is not only the reason here, the multiple conditions for the Front Page were added with OR which was the actual reason behind your issue. I went ahead and changed the clause into the AND and also set the other headers priority higher and it starts working. I would suggest you check and let us know if you are still having the issue.

Thanks

Hey @Misho,

I just want to chime in here that just editing the priority of your headers worked when I tested.

The Global Header applied to your directory listing page as opposed to your previous setup and this is my understanding of the problem.

Depending on what you really want, @tristup is right that you must take into consideration the AND/OR part.

Hi!

I apologize for failing to explain the problem properly. The issue is not resolved.

This is the setup I need to achieve:

  1. Absolute Header needs to be assigned to:
  1. The Relative Header needs to be applied to everything else, including Blog articles and Directory listings.

If the relative Header is set to “Entire site”, that does solve the Blog, eg: https://www.discoverplitvice.com/open-air-movie-night-2020/

HOWEVER,

That is still NOT solving the Directory Listing Post type, eg: https://www.discoverplitvice.com/poi/nikola-tesla-memorial-centre-smiljan/. (It does look as expected inside the Header Builder, however on the front-end does not).

As I have mentioned before, Directory Listings should have “post” classes, but they have “page” classes instead. It seems to me that Directory listing posts are declaring themselves as pages, and also the directory listing body classes are present on all pages on the website. That might be the reason why the Headers cannot be assigned.

Thanks!

Hi @Misho,

It is still not clear where you have mentioned in Point No. 1:All Pages and in Point No. 2: Everything else, can you please explain what is the difference between these two. And the directory listing has the page template set for the single listing details, and that is the reason it shows the page class.

Thanks for understanding.

Hi!

Sorry for the confusion. By “Everything else” i mean “Entire Site”.

image

I am not sure what you mean. Are you saying that their page template can be changed to something else? I haven’t seen any such option. Unfortunately the plugin author wants me to extend Envato support to deal with this, even if it seems to be their issue. I will do it if needed, but I wanted to check that it actually is their bug.

Thank you!

Hi @Misho,

The confusion is with All Page and Everything Else both are pointing to Entire Site option, you need to add any other clause with one of it to segregate from each other. And the directory listing page uses the Page Template and that is why it shows the Page classes instead of Posts classes.

Hope it helps.
Thanks

1 Like

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