Skip to main content

Posts

Removing comments from the Wordpress Twenty Fourteen theme

To permanently remove comments from the Wordpress Twenty Fourteen theme, the file you will want to edit is: /themes/twentyfourteen/single.php Within this file, you will find the following code which you can either delete or comment out: // If comments are open or we have at least one comment, load up the comment template. if ( comments_open() || get_comments_number() ) { comments_template(); } Now, there is also meta  info for each content type which will list the number of comments next to the date the post was posted on under the title of each post.  You'll like want to remove this reference as well (otherwise, they will all say 0 comments). To do so, open up the content- .php  file in the theme folder.  For example, on a site I did this on, I edited the content-image.php  file. Look for the div with the class " entry-meta " and delete the line referencing " comments " within that div.  Just cull those lines.

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');