- This topic has 7 replies, 3 voices, and was last updated 15 years, 5 months ago by imported_Ryan.
-
AuthorPosts
-
May 31, 2009 at 2:14 pm #844boooboooMember
Editing the core file to make a page/category hybrid drop down emboldened me to try something else for another site: A menu option that only appears for registered users. I won’t bother linking since it won’t look like anything to non-members of the site but I made line 122 of core.php look like this:
function custom4() {if ( is_user_logged_in()) {echo get_option(‘suckerfish_custommenu4’) ;}} // THIS MAKES CUSTOM 4 A LOG-IN ONLY DROP DOWN…
So custom 4 is now a members-only field that I have some special ‘insider’ sections listed in. Of course, those sections have some additional privacy added to them with other plugins (wp-private, simple:press forum).
It strikes me that this might be a feature that you could add easily in the future if you wanted…
May 31, 2009 at 7:34 pm #6327boooboooMemberI changed it to this:
function custom4() {if ( is_user_logged_in()) {echo get_option(‘suckerfish_custommenu4’) . ‘<li class="cat-item"><a href="’ . wp_logout_url() . ‘" title="Logout"><strong>Logout</strong></a></li></ul> ‘;}} // THIS MAKES COUSTOM 4 A LOG-IN ONLY DROP DOWN…
I had to leave the final </ul> out of the custom 4 field so I could close it here instead but now there’s a nice log-out feature at the end of the members-only drop down.
June 1, 2009 at 4:54 am #6328imported_RyanMemberExcellent! This is a great idea and I’ll incorporate this feature into a new plugin I’m working on. I’ll add support for this in ALL of the custom code options and when a checkbox is ticked it will make that custom code box only visible to logged in users.
June 1, 2009 at 7:13 am #6329imported_RyanMemberI’ve now added this feature into a test version of a new plugin I intend to release.
June 1, 2009 at 1:59 pm #6330boooboooMemberSweet! Is it a different plug-in entirely or an update to the dropdown menu plugin?
June 3, 2009 at 9:41 am #6331imported_RyanMemberIt’s an entirely new plugin. I’ll be providing a smooth path to transition from the Multi-level Navigation plugin to the new one though. The new plugin is not only for multi-level menus, hence the name change. I’ll continue supporting the current plugin with updates for the foreseeable future though.
June 3, 2009 at 10:28 am #6332stickyshiftMemberIwe been wondering something around that. How can i make certain parts only accessible for members with this menu? So when im not logged in, i can only see the item on the menu. But when i log in, i will be able to see and access the sub menus on that item.
June 7, 2009 at 4:09 am #6333imported_RyanMemberYou need to write a PHP script which checks whether the user is logged in and then loads an extra chunk of the menu accordingly.
-
AuthorPosts
- You must be logged in to reply to this topic.