Custom social sharing buttons for Twitter, Facebook, Google Plus, LinkedIn, StumbleUpon, and Pinterest.
via http://siliconstation.com/how-develop-custom-google-plus-button/
<a class="icon-twitter" rel="nofollow"
href="http://twitter.com/"| <?php | |
| $gallery_id = 1; // Use the PODS column, custom post field or however you would get this ID | |
| $results = $wpdb->get_results("SELECT ng.path, np.filename FROM wp_ngg_pictures np, wp_ngg_gallery ng WHERE np.galleryid=ng.gid AND np.galleryid=".$gallery_id." AND np.pid=ng.previewpic",ARRAY_A); | |
| if(!empty($results[0]['path']) && !empty($results[0]['filename'])) : | |
| $imgpath = $results[0]['path'].'/'.$results[0]['filename']; | |
| endif; |
| [ | |
| {name: 'Afghanistan', code: 'AF'}, | |
| {name: 'Åland Islands', code: 'AX'}, | |
| {name: 'Albania', code: 'AL'}, | |
| {name: 'Algeria', code: 'DZ'}, | |
| {name: 'American Samoa', code: 'AS'}, | |
| {name: 'AndorrA', code: 'AD'}, | |
| {name: 'Angola', code: 'AO'}, | |
| {name: 'Anguilla', code: 'AI'}, | |
| {name: 'Antarctica', code: 'AQ'}, |
| <?php | |
| $morestring = '<!--more-->'; | |
| $explode_content = explode( $morestring, $post->post_content ); | |
| $content_before = apply_filters( 'the_content', $explode_content[0] ); | |
| $content_after = apply_filters( 'the_content', $explode_content[1] ); | |
| ?> |
| <?php | |
| /* | |
| * Plugin Name: Example Modify Price | |
| */ | |
| class Example_Modify_Price { | |
| private static $instance; | |
| public static function register() { | |
| if (self::$instance == null) { |
| //add&remove field from user profiles - sorce:http://davidwalsh.name/add-profile-fields | |
| function modify_contact_methods($profile_fields) { | |
| // Add new fields | |
| $profile_fields['company'] = 'Company'; | |
| // Remove old fields | |
| //unset($profile_fields['aim']); | |
| return $profile_fields; |
| /** | |
| * Optimize WooCommerce Scripts | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag | |
| remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) ); |
| <?php | |
| //Modify the output of the gallery short code | |
| add_filter('post_gallery', 'scaffolding_post_gallery', 10, 2); | |
| function scaffolding_post_gallery($attr) { | |
| $post = get_post(); | |
| static $instance = 0; | |
| $instance++; | |
| if ( ! empty( $attr['ids'] ) ) { |
| <?php | |
| /** | |
| * Optimize WooCommerce Scripts | |
| * Updated for WooCommerce 2.0+ | |
| * Remove WooCommerce Generator tag, styles, and scripts from non WooCommerce pages. | |
| */ | |
| add_action( 'wp_enqueue_scripts', 'child_manage_woocommerce_styles', 99 ); | |
| function child_manage_woocommerce_styles() { | |
| //remove generator meta tag |
Custom social sharing buttons for Twitter, Facebook, Google Plus, LinkedIn, StumbleUpon, and Pinterest.
via http://siliconstation.com/how-develop-custom-google-plus-button/
<a class="icon-twitter" rel="nofollow"
href="http://twitter.com/"