Get Contents from Visual Composer Page and Load into Another with CSS Styling

<?php $id = 200; //page id $shortcodes_custom_css = get_post_meta( $id, ‘_wpb_shortcodes_custom_css’, true ); if ( ! empty( $shortcodes_custom_css ) ) { echo ‘<style type=”text/css” data-type=”vc_shortcodes-custom-css-‘.$id.’”>’; echo $shortcodes_custom_css; echo ‘</style>’; } $post = get_post($id); echo apply_filters(‘the_content’, $post->post_content); ?>

Send E-mail with Attachment using PHP

Here’s a perfectly working snippet of PHP code which will send an e-mail with an attachment (of any file type). This code has been updated to disable jumbled/garbage/corruption which showed up on gmail (while it was fine on Outlook). //File settings $fileatt = “../uploads/myLovelyFile.pdf; $fileatttype = “application/octet-stream”; //Octet-stream is a file type to allow all […]

Add Checkmarks to your Unordered List Items

You have a regular unordered which shows with bullet points just like this: HTML: <ul> <li>Apples</li> <li>Oranges</li> <li>Grapes</li> </ul> Result: Apples Oranges Grapes The bullet points are ugly and the check marks would be so much more relevant. Here’s how to turn the bullet points into checks. First, add a class like checkmark to the […]

Default Value for Submitting Forms using “Get”

I have this form I’m working on for a client which transmits data to another site for scheduling and processing. The form needs to use the “get” method where all of the values are assigned as part of the url. The sending URL looks like this: http://kimberleygriffith.com?ZIP=12345&PRODUCT=2&QUANTITY=4 ZIP = 12345 PRODUCT = 2 QUANTITY = […]

Two Simple Tips to Securing Your WordPress Site

Captcha

1. Never use the default ‘admin’ as your administrator login username. As it is the default, unauthorized parties trying to wrongfully access your site will attempt using ‘admin’ to log in. Changing the username to something, anything other than ‘admin’ will prevent malicious attacks. 2. Add a Captcha Code. A Captcha (a backronym for “Completely […]

PHP Mail Special Characters in Subject Field

Let’s say you’d like to insert special characters in the subject of HTML e-mails sent with the PHP mail() function. You have an email subject which when extracted from my database looks like this.. Coffee &amp; Laptop Sample code.. $to = ‘me@example.com’; $subject = ‘Coffee &amp; Laptop’; $message = ‘HTML message…’; $headers = ‘MIME-Version: 1.0’ […]

CSS Media Queries for Mobile Devices

Writing CSS for different devices can be a pain in the ass. With Media Queries it’s easier, if you know how to pin point a specific device. This can help you pin point a specific mobile device from within your CSS. Copy the code and paste it into you CSS file and get crackin’! /* […]

Your Desktop Site Will Look the Same!

I often receive requests from potential customers on making their website ‘mobile friendly’ or ‘mobile responsive. ‘Mobile responsive’ means the webpage reacts to the size of the device its being displayed on. In other words, a mobile responsive web page viewed from a tablet will look differently when viewed from a mobile phone. That’s because […]