Forum Replies Created
-
This code would probably be a lot easier still. You don’t have to worry about any changes to your custom menus because it targets all external links in your main navigation, no matter where they may be in the menu.
jQuery(document).ready(function($) { $('.sf-menu a:not([href^="http://thesoldiersnetwork.com"]):not([href^="#"]):not([href^="/"])').addClass('external').attr({ target: "_blank" }); });EDIT: forgot to include
.attr({ target: "_blank" })in the above code… it’s there now 😉In reply to: Call to arms – Own your task+1 for the hook manager idea for a theme option. It would make adding custom features a lot simpler for many.
No, it’s not a simple edit on any specific page because those are links you’ve added to a WP Custom Menu. As they are stored in the database and called via the wp_nav_menu function, they won’t be visible in any file.
But it looks like it can be done with jquery. 🙂 Assuming you want to continue using WP Custom Menus for those links in your navigation (rather than hard-coding them into your header.php file), you’d need to target only those links contained within the specific
<li>item in the menu. (According to Firebug, that would be.sf-menu li#menu-item-174 li a. Note that if you modify the custom menu after applying any rules to that specific li#, you may need to adjust the the following code ‘cuz the li# may change.)jQuery(document).ready(function($) { $(".sf-menu li#menu-item-174 li a[href^='http://']").attr("target","_blank"); });To see how it’s done, see the 2nd example snippet on this page: http://css-tricks.com/snippets/jquery/open-external-links-in-new-window/
…as well as wp_enqueue_script: https://codex.wordpress.org/Function_Reference/wp_enqueue_scriptAnother way would be to use register_nav_menu to create an additional Theme Location under WP Custom Menus where you can assign a special menu coded to open all links in new windows. See the WP codex here for that: https://codex.wordpress.org/Function_Reference/register_nav_menu
Hope this helps 🙂
…and have fun!In reply to: Centering a PhotoDo you still have a plugin activated that modifies wp-login.php? If so, deactivate it.
Also check your theme’s main stylesheet to see if any styles are applied to div#login h1 a ‘cuz Firebug shows margins left & right:-90pxIf you can’t find anything, try adding the following to your theme’s stylesheet to override whatever’s causing those weird margins:
div#login h1 a {margin:0; !important}Gee, if that’s a service you offer, I’d be interested once I finally get my multisite project off the ground!
In reply to: No one can Join on my siteYou’re welcome
In reply to: No one can Join on my siteIt looks like registration is not enabled in your WordPress backend.
If you’re running WP single, go to “Settings” > “General” and check “Anyone can register”. On WP multisite, go to “Network Admin” > “Settings” and make your selection at “Registration Settings”.
@djpaul
Thanks for reminding me of my favorite prayer: “Oh Lord, help me to keep my big mouth shut until I know what I am talking about.”@rossagrant
Sorry if I led you astray
BP is a plugin that creates its own metadata and db tables to store that data. So, deleting a user via the WP backend simply removes the user from being associated with your site. But it does not delete BP metadata associated with that same user in the BP part of things.
For all user metadata to be deleted from BP tables, you must delete the user via the “Delete [username]” link in the “Admin Options” menu that appears in the adminbar when visiting the user’s profile. I just deleted a test user from my sandbox and watched as all activity items disappeared.
In reply to: Navigation HELPLooks like you’ll have to contact the theme developer then to find out where the nav is, sorry can’t help more
In reply to: Navigation HELPWell, looking at your site and their demo site with Firebug, you can see that the nav items are wrapped in a
<ul>tag that’s identified like so:
ul id="menu-nav" or ul class="menu-item"That ul sits in a div identified like so:
div id="nav-row" or div class="main-nav"The only other file that I can think of would be functions.php. If the menu is created there, there would be a corresponding do_action in header.php. If you can’t find any reference to the above divs or uls in the header, try in functions. It’s gotta be there somewhere! 🙂
In reply to: Navigation HELPOpen your theme’s header.php (or equivalent) and find the code for your main navigation. In your theme, you’ll find it in
div id="nav_row". There’s probably a call to wp_nav_menus there. Add the following before the closing ul tag (should work 😉 )<li></li>See the codex for more: https://codex.buddypress.org/theme-development/modifying-the-buddypress-admin-bar/
Hope this helps 🙂
In reply to: How to change BuddyPress background?Open the file called style.css in your theme and look for “body” (it’ll be near the top). Modify the background-image & background-color properties to suit your theme.
You could also check out themes that enable you to customize stuff with a few clicks in an admin panel. Just so happens I’ve built a couple
Here’s a link to the freebie: http://buddylite.com/buddylite-basic/You’re on your way to learning all kinds of cool stuff! Have fun
In reply to: Whats the plugin your using?@adamkb.balan
That’s not a plugin, it’s a standard Buddypress widget. Look under “Widgets” in your WordPress backend and you’ll see the one called “Who’s Online Avatars”. Just drag that widget to your sidebar and voilà !
In reply to: help with ads pleasesTry Advertising Manager. I’ve had no problems at all with it. It works like a charm and automatically recognizes most ad networks.
In reply to: Page level privilegesThe easiest way to set this up with s2member would be to go to the user’s profile in your WP backend and assign that member the “Role” of “s2member Level 4”. Then go to edit the page you want to restrict access to and, in the “s2member” section at top-right, select “Require Level #4” at “Page Level Restriction?”. I haven’t tried this myself, but it should work to restrict access to that page to only those members who have a Level 4 membership (whether paid or not, doesn’t matter).
For even more granular control, see the following 2 sections under “s2member” > “API/Scripting”:
“Using Advanced Conditionals” & “Custom Capabilities”.If you need more help with this plugin, the best place to go is their support forum: http://www.primothemes.com/forums/viewforum.php?f=4
Have fun!
In reply to: How do members “friend” each otherI just tried creating an account on your site and believe I’ve found the cause of the discrepancy between subscribers and members: no activation email is received so folks simply cannot activate their accounts.
Check with your hosting provider to ensure that your email accounts are set up correctly for WordPress (Buddypress uses the same email routines as WP).
In reply to: Page PrivilegesIn reply to: Page level privilegesWhat you’ve described (create and assign custom capabilities per subscription type/level) is one of the basic features of a very powerful plugin called s2member. It can seem overwhelming at first (it’s huge!), but once you start playing with it and experimenting, you’ll see just how flexible it can be.
http://www.primothemes.com/post/product/s2member-membership-plugin-with-paypal/Hope this helps!
In reply to: How do members “friend” each otherWhen logged-in, simply visit the Members Directory or the member’s Profile and click “Add Friend”.

EDIT: remember to also make sure “Friends” is enabled under “Buddypress” > “Component Setup” in your WordPress backend.
In reply to: How to Share/Repost Friends’ Status/Activity?In reply to: How to Share/Repost Friends’ Status/Activity?Username “Stacy” is a known spammer who gives “advice” that is potentially harmful to your computer. It is not advisable to use the code above.
This plugin should get you what you want:
https://buddypress.org/community/groups/buddypress-share-it/In reply to: Someone show me a simple and clean siteOnce you’ve been inspired
, you can also check out some themes that are really easy to customize. Like Custom Community (free and premium versions) http://www.custom-community.themekraft.com/ or my very own BuddyLite (freebie) or BuddyBuilder (premium) http://buddylite.com/In reply to: Members’ privacy: how can I hide members’ profiles?I know I`m tooting my own horn here
, but my BuddyBuilder theme enables you to allow user access to individual BP components and WP pages/posts depending on logged-in/logged-out status. It also provides an optional Site Lockdown feature with/without a Splashpage on the frontpage, and an optional custom redirect page if Site Lockdown is enabled. See the bottom of the right-hand column on this page for all the Privacy features available: http://buddylite.com/buddybuilder-options/In reply to: Remove a user from a groupGo to the group in question.
Click Admin > Manage Members > Remove from group (next to the member you want to remove)
