Every once in a while i run into this crazy issue. I have an image inside a link like so: <a href=”link”> <img src=”source”/> </a> I am trying to add a caption with a background color on top of the image, but for some reason there is an extra 4px or so at the bottom Read More…
You can add or get rid of User profile fields in the backend by using the code on this page. http://davidwalsh.name/add-profile-fields I also created a profile page to keep track of progress for each user that is logged in using Gravity Forms. These are the steps I used: Create a Form that has checkboxes. Install Read More…
WordPress has a built-in display categories widget that can show as a list or a dropdown. However, it only shows categories with posts attached to them. If you want to show all categories in a dropdown use this code. <form action=”<?php bloginfo(‘url’); ?>/” method=”get”> <?php $select = wp_dropdown_categories(‘show_option_none=Select State&show_count=1&orderby=name&echo=0&selected=0&hide_empty=0’); $select = preg_replace(“#<select([^>]*)>#”, “<select$1 onchange=’return this.form.submit()’>”, Read More…
I used this function to strip the formatting from a submitted phone number and return just the numbers e.g. 1234567890 $phone = preg_replace(‘/\D+/’, ”, $entry[8]); print_r($phone); The phone number was formatted like this (123)456-7890
Trying to figure out how to get event tracking working with the new async (analytics.js) code was a pain. Googles documentation for anything to do with analytics is always confusing. <script> (function(i,s,o,g,r,a,m){i[‘GoogleAnalyticsObject’]=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,’script’,’//www.google-analytics.com/analytics.js’,’ga’); ga(‘create’, ‘UA-XXX-X’, ‘example.com’); ga(‘send’, ‘pageview’); //here is the code that actually worked. You put it in the script area Read More…
This is some code that will help you to customize the password protected form. // change password protected text function my_password_form() { global $post; $label = ‘pwbox-‘.( empty( $post->ID ) ? rand() : $post->ID ); $o = __( “<p>In preparation for the Buying Summit we recommend you watch this incredible training from Matt Larson. Read More…
These are some things that I learned when trying to modify buddypress pages that took me a while to figure out. User Blogs Use these 2 plugins together to add user blog capability without having to use a multisite setup. Buddyblog BP Simple Front End Post To change the permalink slug to what you want Read More…
So, I hadn’t thought of doing this until today, but with a small snippet of jQuery you can target just about any html element that you want. Use this to add a simple target-able class $(‘div #minitwitter-widget-2’).addClass(‘clearfix’); You can even add a counter to a list of items by using this $( “#metaslider_4 ul li” Read More…
http://www.cgsecurity.org/wiki/TestDisk_Download I used this file recovery software to get .cr2 files from a formatted SD card. It also does every other type of file and it is FREE. The only downside is that it is DOS so windows only and no GUI. On the plus side you dont have to install it. It just Read More…
To add the custom background functionality in the Theme Customizer use this code. /** * Setup the WordPress core custom background feature. * * Use add_theme_support to register support for WordPress 3.4+ * as well as provide backward compatibility for WordPress 3.3 * using feature detection of wp_get_theme() which was introduced * in WordPress 3.4. Read More…