Life runs on code

Month: May 2014

User Avatar in buddyPress notification loop

User Avatar in buddyPress notification loop

To display user avatar in buddypress notification-loop (You can find it in members / single / notifications / notifications-loop.php ) Below snippet will return user id of that activity ( BuddyPress stored it as  secondary_item ) $bp = buddypress(); $user_id = $bp->notifications->query_loop->notification->secondary_item_id; To echo avatar from user id […]

Loading IE Conditional Stylesheets in WordPress

Loading IE Conditional Stylesheets in WordPress

Most web developers are familiar with the IE conditional comments that allow you to load a stylesheet only in Internet Explorer. <!– [if lt IE 9]> <link href=”ie.css” rel=”stylesheet” type=”text/css”> <![endif]–> Many new WordPress developers tend to just hardcode these conditional comments directly into their […]