Course Catalogue & Membership Pages acting as Archives
-
The Course Catalogue Page and Membership pages are of type “archive” which is giving me some problems. I have workaround for every issue except for the FIRST (I listed the other issues as an fyi…)
BUG…
1. When I add these pages to the menu, they aren’t registering as “active” when I am on those pages
ie: the active classes aren’t being addedAlso, if I have a static page for Home and Blog set, when I am on a Course Catalogue Page or Membership Page, the BLOG menu item is active.
FYI…
2. I have a sidebar show up on the Course Catalogue and Membership Page. This is supposed to be full width so it’s obviously not supposed to show up.
The workaround in my sidebar.php is to check for post_type_archive…
if ( is_singular( ‘course’ ) || is_singular(‘lesson’) || is_post_type_archive() ) : …3. I have meta data that I want to access on the Course Catalogue and Membership pages and being that they are defined as archive pages, it’s difficult to get page data because you can’t get the id from archive pages.
The workaround is to check for is_archive() and then get the page slug and find the id using get_page_by_path(slug)
- The topic ‘Course Catalogue & Membership Pages acting as Archives’ is closed to new replies.