This file contains 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
/* WP e-commerce core has been edited | |
* ::root::\wp-content\plugins\wp-e-commerce\wpsc-admin\includes\product-functions.php | |
* | |
* Line #221 changed priority 10 save to priority 5 was conflicing with ACF BT - 4.29.2013 | |
* add_action( 'save_post', 'wpsc_admin_submit_product', 5, 2 ); | |
*/ | |
remove_action( 'save_post', 'wpsc_admin_submit_product', 10, 2 ); | |
add_action( 'save_post', 'wpsc_admin_submit_product', 5, 2 ); |
This file contains 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_theme_support( 'post-thumbnails', array( 'post', 'page', 'works' ) ); | |
add_image_size( '{image-name}', 290, 144, true ); | |
add_image_size( 100, 85, true ); | |
// Prints function | |
<?php the_post_thumbnail( '{image-name}' ); ?> | |
<?php the_post_thumbnail(); ?> |
This file contains 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
function widget($atts) { | |
global $wp_widget_factory; | |
extract(shortcode_atts(array( | |
'widget_name' => FALSE | |
), $atts)); | |
$widget_name = wp_specialchars($widget_name); | |
This file contains 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
// Enamble Custom Field output in functions.php | |
function print_custom_field($custom_field) { | |
global $post; | |
$custom_field = get_post_meta($post->ID, $custom_field, true); | |
echo $custom_field; | |
} | |
// Prints function | |
<?php print_custom_field('{name}'); ?> |
This file contains 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 in functions.php | |
Validate Numbers in Contact Form 7 | |
This is for 10 digit numbers - [phone] for feild | |
*/ | |
function is_number( $result, $tag ) { | |
$type = $tag['type']; | |
$name = $tag['name']; | |
if ($name == 'phone' || $name == 'fax') { // Validation applies to these textfield names. Add more with || inbetween |
This file contains 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
// Creates a shortcode | |
function HelloWorldShortcode() { | |
return '<p>Hello World!</p>'; | |
} | |
add_shortcode('helloworld', 'HelloWorldShortcode'); | |
//Output on page [helloworld] |
This file contains 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
// Creates directory path to child theme - functions.php | |
function get_childTheme_url() { | |
return dirname( get_bloginfo('stylesheet_url') ); | |
} | |
// Prints path | |
<?php echo get_childTheme_url(); ?> |
This file contains 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
<script> | |
$(function(){ | |
var hash = window.location.hash; | |
hash && $('ul.nav a[href="' + hash + '"]').tab('show'); | |
$('.nav-tabs a').click(function (e) { | |
$(this).tab('show'); | |
var scrollmem = $('body').scrollTop(); | |
window.location.hash = this.hash; | |
$('html,body').scrollTop(scrollmem); |
This file contains 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 | |
include_once(ABSPATH . WPINC . '/feed.php'); | |
$rss = fetch_feed('http://mattsmithpt.wordpress.com/feed/'); | |
$maxitems = $rss->get_item_quantity(5); | |
$rss_items = $rss->get_items(0, $maxitems); | |
?> | |
<ul> | |
<?php | |
if ($maxitems == 0) | |
echo '<li>No news stories.</li>'; |
This file contains 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
define('WP_SITEURL', 'http://www.yournewurl.com'); | |
define('WP_HOME', 'http://www.yournewurl.com'); |
OlderNewer