Skip to main content

Posts

Wordpress Plugin - Lightbox Gallery: Separate Galleries on page

If you are using the Lightbox Gallery plugin for Wordpress and want to enable it on a "blog roll" type page (where all your posts show up on one page), you will find that the lightbox pop up will actually include all the images on the page when you only want it to include the images from that specific post. The solution is a quick code change in /wp-content/plugins/lightbox-gallery/lightbox-gallery.php Search for: 'class'      => "'" . $post->ID . "'",  and replace with: 'class'      => 'gallery1',

How To Set Default Attachment Display Settings In WordPress

This is a pretty quick fix. Add this to your functions.php for your theme and then you can set the default for the image attachment settings function mytheme_setup() { // Set default values for the upload media box update_option('image_default_align', 'center' ); update_option('image_default_link_type', 'media' ); update_option('image_default_size', 'large' ); } add_action('after_setup_theme', 'mytheme_setup'); Obviously changing the values to what you want as the default.

Wordpress - Creating Pages On Site Setup

If you, like me, create a bunch of Wordpress sites and, while building your menu, create all the blank pages for placeholders, then this plugin is for you. http://wordpress.org/plugins/bulk-page-creator/ The Bulk Page Creator lets you create all your pages on one single page using a little Ajax.  It's quite simple and saves you a ton of time.

Heart Shaped Social Icon for Instagram

A bit of a random post I grabbed this icon set for a site: Heart Shaped Icons . Unfortunately, it was missing the Instragam icon, so I made my own:

WP Anything Slider

I recently added the WP Anything Slider to a Wordpress blog that I was doing development on.  The default animation options are scrolls (based on the JQuery Cycle plugin).  I wanted to add a fade animation. Thankfully, it's pretty easy to add fade as an effect.  You can add whatever you want from the Jquery Cycle Plugin. Just edit plugins/cycle-setting.php and search for the options list, duplicate the line with "ScrollDown" on it and then replaced the instances of ScrollDown on that line with Fade...done. <select id="wpanything_sdirection" name="wpanything_sdirection"> <option value=""></option> <option echo="" if="" php="" scrollleft="" selected="" value="scrollLeft" wpanything_sdirection_x="=">&gt;scrollLeft</option> <option echo="" if="" php="" scrollright=...

Fix For Joomla Admin Menu That Stops Working

A quick fix for those of us who have encountered the top admin menu in Joomla becoming unresponsive. You know, you click, but no sub menu appears? If you check your dev tool of choice (ie. Firebug), you'll most likely see something like this: $ES is not defined The issue has to do with mootools.js and how older versions of Joomla handle the rendering of the admin menus.  Recently, I ran into this issue when I installed a newer version of mootools so that I could get a lightbox effect on a Joomla Virtuemart store.  What I didn't realize at the time was this resulted in the admin menu failing. The fix, thankfully, is quite easy. The file is:  /administrator/templates/khepri/js/menu.js The changes are: Find: var elements = $ES('li', el); Replace with:   var adminMenu=el.id; var elements = $(adminMenu).getElements('li'); Find: nested = $E('ul', element); Replace with: nested = element.getElement('ul');

YiiFramework - Check If User Is Logged In (couponic)

So, I was doing a bit of customization of a Couponic template where I wanted to add a squeeze box (a future post!), but I first needed to check if a user was logged in or not. I didn't want a logged in user to see the squeeze box so I needed to figure out how the framework checked if a user is logged in. Well, it's pretty simple (I've included a quick and dirty write to the browser console log for quick debugging) <?php $isUser = Yii::app()->user->checkAccess('user'); if(!$isUser){ ?> <script> console.log("NOT A USER!!!!!!!!!!!!"); </script> <?php }else{ ?> <script> console.log("IS A USER!!!!!!!!!!!!"); </script> <?php } ?>