WordPress – Creating a Child Theme, the pure basics

# WordPress – Creating a Child Theme, the pure basics A child theme consists of at least one directory (the child theme directory) that will be placed under the themes folder and two files (style.css and functions.php), which you will need to create: This is basically all you need to create a child theme. …


jQuery and General JavaScript Snippets

This will be a growing list of jQury, maybe even general JavaScript Snippets that I use a lot and always forget. # Add/Remove a class jQuery Add a class to a element jQuery(‘selector’).addClass(‘active’); Remove class from an element $( “p” ).removeClass( “myClass yourClass” ) # Find the html <a> Element with href that contain a …


JavaScript – Getting URL Parameter and setting a URL parameter (Snippet)

# Getting a URL Parameter A function that you give it the param, (url params or url args, whatever you want to call it) to find from the current url (key), and she returns the value of that parameter. var getUrlParameter = function getUrlParameter(sParam) { var sPageURL = decodeURIComponent(window.location.search.substring(1)), sURLVariables = sPageURL.split(‘&’), sParameterName, i; …


JavaScript – On document ready (Snippet)

# JavaScript – On document ready (Snippet) Common use is let’s say you want to change color to an element to red, but when you run it you get a console error telling you that the element doesn’t exist, depending on your code structure, it is possible that this code is running before that …


Installing Composer Globally on CentOS 7

# Installing Composer Globally on CentOS 7 First you need to make sure your system is up-do-date, for that you need to run yum -y update Download and install Composer by executing the following command: curl -sS https://getcomposer.org/installer | php Once the process completes, you can make the ‘composer.phar’ file executable by running the …


Git – General Notes and Basic commands

# Starting git on a folder git init # Starting BitBucket repo # It’s Pretty much the same process for any other git service like GitHub. BTW, the main difference between GitHub and BitBucket services is that in Github it’s free to create public reops, and in BitBucket it’s free to create private repos. …


Bootstrap Responsive Debugging – CSS Media Queries Debugging

Easy way to debug Responsive media breakpoints when you are using Bootstrap. If you are not using Bootstrap you can still adapt this method for Bootstrap debugging in your project, all you need to do is just write these classes to fit your grid system and breakpoints and you are good to go. Just …


Fast WordPress Debug (Debug to console)

A fast way to debug that I use to debug in WordPress, In fact I got used to it so much that I use it on any PHP environment or framework that i work on. The method is debugging php variables and arrays to the console (the browser console) and will print out at …


Making .gitignore to take effect (gitignore is not working)

When you add/modify the .gitignore file and then try to commit the changes, you will see that the files you asked git to ignore are still on the HEAD, they are still there, this is because you need to tell git to remove them from the index. The way to “fix” .gitignore file is …