Home › Forums › WoodMart support forum › No Sidebar when custom archive has no posts.
No Sidebar when custom archive has no posts.
- This topic has 9 replies, 2 voices, and was last updated 1 year, 3 months ago by Aizaz Imtiaz Awan.
-
AuthorPosts
-
September 2, 2023 at 8:49 am #492741
toulipParticipantHello there, I hope you are well.
I have noticed that for the archive pages (including custom taxonomy archive pages) of my custom post types, when there are no posts to show, the sidebar is not visible. Instead, when there is at least one post listed, the sidebar returns.
I am attaching two screenshots for each case.
Any ideas? Any snippet you could provide to show the sidebar on both cases?
Btw, as mentioned above, this is happening only for the archives of custom post types. For the default WordPress posts the sidebar is there in both case scenarios.
Thanks in advance,
George.
Attachments:
You must be logged in to view attached files.September 2, 2023 at 2:20 pm #492792
Aizaz Imtiaz AwanKeymasterHello,
Can you please share the WP admin login details of your site so I will check and give you a possible solution.
Best Regards.
September 2, 2023 at 9:42 pm #492838
toulipParticipantHello Aizaz,
Thanks for your quick response.
Since our website is a membership one and holds sensitive data for our users, I created a new one for your review and testing.
The behavior is exactly the same on the test website.
You will find the login details below in the private content section.
Thanks in advance,
September 4, 2023 at 10:47 am #492974
Aizaz Imtiaz AwanKeymasterHello,
When you search anything in the archive page and blog page and “nothing found” is the result the sidebar will be shown.
Here is the screenshot:
https://ibb.co/jz1pWPM
https://ibb.co/fF6gs8SCheck back your site after completely clearing the browser cache.
Best Regards.
September 4, 2023 at 3:18 pm #493057
toulipParticipantHello again Aizaz,
Thanks for checking on this.
However, I am not interested in showing the sidebar after a user searches for something. I would like to have the sidebar shown in the custom archive page even if there are no posts there.
Is this possible?
Thanks in advance,
George.
September 5, 2023 at 10:11 am #493226
Aizaz Imtiaz AwanKeymasterHello,
You need to set the sidebar for the custom archive page and when you search anything the result is “Nothing found”. So, It shows the sidebar.
Here looks like:
https://ibb.co/98MV0qzBest Regards.
September 7, 2023 at 8:29 pm #494227
toulipParticipantHello Aizaz,
I do not think I have made myself clear here.
What about showing the sidebar before the user searches for something? This is what I am looking for.
Thanks,
George.
September 8, 2023 at 10:55 am #494364
Aizaz Imtiaz AwanKeymasterSeptember 10, 2023 at 12:17 am #494679
toulipParticipantHello Aizaz,
Thanks for sharing the above link.
I read the document, but it did not help.
Again, see below the links to better understand our issue here:
https://georgef75.sg-host.com/blog/
This is the blog page (posts archive). No available posts to list there, however the sidebar comes up.
https://georgef75.sg-host.com/test/
This is the archive page for the custom post type “tests” I created for the purposes of this ticket. As you see, again, there are no available posts/tests to list there, however the sidebar DOES NOT come up.
I hope this makes the issue clearer now.
Best Regards,
George.
September 11, 2023 at 9:24 am #494836
Aizaz Imtiaz AwanKeymasterHello,
I have visited your site and the sidebar is showing fine. Video for clarification:
https://youtu.be/EE5sO7tACYgIf you have another behaviour please share the small video for better understanding. So I will check and give you a possible solution.
Best Regards.
-
AuthorPosts
- You must be logged in to create new topics. Login / Register