This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Put in your button id and add this to a custom html/js object on your page | |
| <div class="checkbox"> | |
| <label><span id="clicker"><input type="checkbox" name="custom_type" data-custom-type="agree" value="agree_tc"></span> I have read and agree to the terms and conditions of this website</label> | |
| </div> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <noscript> | |
| <iframe src="YOUR_IFRAME_URL" scrolling="no" type="text/html" frameborder="0" allowTransparency="true" style="width:300px;height:100%;overflow:hidden;border: 0"></iframe> | |
| </noscript> | |
| <script type="text/javascript"> | |
| // Add / Update a key-value pair in the URL query parameters | |
| function updateUrlParameter(uri, key, value) { | |
| // remove the hash part before operating on the uri | |
| var i = uri.indexOf('#'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Add / Update a key-value pair in the URL query parameters | |
| function updateUrlParameter(uri, key, value) { | |
| // remove the hash part before operating on the uri | |
| var i = uri.indexOf('#'); | |
| var hash = i === -1 ? '' : uri.substr(i); | |
| uri = i === -1 ? uri : uri.substr(0, i); | |
| var re = new RegExp("([?&])" + key + "=.*?(&|$)", "i"); | |
| var separator = uri.indexOf('?') !== -1 ? "&" : "?"; | |
| if (uri.match(re)) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: SS Content Ads | |
| * Plugin URI: http://kustomdesigner.com/ss-content-ads | |
| * Description: Add ads within single posts by category matching. Also, send a ga.js click event with photo-id for use in split testing ads to see which ones are getting the most response. | |
| * Version: 2.0 | |
| * Author: Michael Hicks | |
| * Author URI: http://kustomdesigner.com/ | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| add_action( 'admin_menu', 'wpto_add_admin_menu' ); | |
| add_action( 'admin_init', 'wpto_settings_init' ); | |
| function wpto_add_admin_menu( ) { | |
| add_options_page( 'Theme Options ', 'Theme Options ', 'manage_options', 'theme_options_', 'wpto_options_page' ); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function upload_image_metabox() { | |
| echo '<p><strong>Upload image</strong></p>'; | |
| echo '<input type="text" id="child_logo_url" name="' . $this->get_field_name( 'welcome-image' ) . '" value="' . esc_attr( $this->get_field_value( 'welcome-image' ) ) . '" size="50" />'; | |
| echo '<input id="child_upload_logo_button" type="button" class="button" value="Upload Image" /> '; | |
| ?> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Recent Posts Widget | |
| * Note* - The WP_Widget class is located in wp-includes/class-wp-widget.php. | |
| */ | |
| //Add Custom Excerpt Length | |
| function excerpt($limit) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <? | |
| // Add at bottom of functions.php file | |
| //Example with minimum options | |
| function create_post_type() { | |
| register_post_type( 'acme_product', | |
| array( | |
| 'labels' => array( | |
| 'name' => __( 'Products' ), | |
| 'singular_name' => __( 'Product' ) | |
| ), |