Right Hand Menu Logic
The right hand menu area has different things on it depending on what page/post is being viewed. There are basically three different groupings of menu types: navigation menus and text items, items in a given category, and related items (based on tags).
One important note: if you are going to add or edit any of the Recent Posts Extended items, you MUST disable Wordfence. The two do not interact well together, and if you forget to do this you will often get notices from Wordfence that a certain activity has been blocked. No amount of whitelisting will fix the issue. Remember to re-enable Wordfence when you are done.
Navigation Menus and Text Items
There are three navigation menus that are fixed. These can all be updated in the Appearance > Menus area. The Focus Areas menu is set to show only on the four focus area pages. If you add any new focus areas you need to update the pages on which the widget is visible. The Content Docs and Developer Docs menus show on any page that has a category of Documentation. Because pages don’t normally have categories, you have to use WordPress Conditional Tags to set the visibility. You set those by going to the Other Settings tab (or the gear icon) near the bottom of the widget and then select the Logic tab. Here’s an example of what that looks like:
![Example of display logic area in a widget](https://calstateinnovate.org/wp-content/uploads/2019/10/display-logic.png?x98914)
The two text items are for webinar pages. The logic there is similar to above but also includes a page number. For webinars we didn’t want the “about” page to show up in the lists of webinars, so it isn’t in the webinar category, but we did what the text items to show up on that page. You’ll see that logic a few other places.
Items in a Category
Many of the sections (including webinars, minigrants, and innovation grants) have a menu of recent items. The project section is very similar, except the menu items are alphabetical instead of most recent. Here’s an example of what that looks like:
![Example of a Recent Items widget](https://calstateinnovate.org/wp-content/uploads/2019/10/recent-example-1024x971.png?x98914)
You can use this as an example if you ever need to create new category menus. If you do create a new category menu, you need to UNCHECK the option labeled Use Default Styles and then copy the CSS styles from one of the other category menus into the CSS box so that the small modifications for the other menus get applied to the new menu. The visibility logic is in the same place as mentioned in the section near the beginning, and as long as you understand WordPress Conditional Tags the logic should be self explanatory.
Related Items
Related item menus are built based on tags. As of today the tags have not been implemented, but there are tags for the four focus areas and menus built for them. If you add a tag you need to build a new Related menu for it. Here’s an example of a completed Related menu:
![Example of a Related Items widget](https://calstateinnovate.org/wp-content/uploads/2019/10/related-example-1024x949.png?x98914)
You can use this as an example if you ever need to create new Related menus. If you do create a new related menu, you need to UNCHECK the option labeled Use Default Styles and then copy the CSS styles from one of the other related menus into the CSS box so that the small modifications for the other menus get applied to the new menu. The visibility logic is in the same place as mentioned in the section near the beginning, and as long as you understand WordPress Conditional Tags the logic should be self explanatory.