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
<p>Your Name (required)<br /> | |
[text* your-name] </p> | |
<p>Your Email (required)<br /> | |
[email* your-email] </p> | |
<p>Subject<br /> | |
[text your-subject] </p> | |
<p>Your Message<br /> | |
[textarea your-message] </p> | |
<p class="captcha"> | |
Enter the following phrase in the text box below: |
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
register_post_type('book', array('label' => 'Books', | |
'description' => 'Books and other items for sale on the Heyday website', | |
'public' => true, | |
'show_ui' => true, | |
'show_in_menu' => true, | |
'capability_type' => 'post', | |
'hierarchical' => false, | |
'rewrite' => array('slug' => ''), | |
'query_var' => true, | |
'supports' => array('title','editor','excerpt','custom-fields','revisions','thumbnail','author','page-attributes',), |
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
#!/usr/bin/sh | |
# This script will overwrite an existing | |
# WordPress installation with the current | |
# head of trunk. Once it has been reverted, | |
# you may need to update the database, and | |
# WP will prompt you for that automatically. | |
# This is untested with these options! | |
# The script commands work from the command |
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
-- handy for moving a database from prouction to your local environment. | |
-- change URL's in wordpress single-site install. Replace with your own URL's. | |
-- this doesn't address serialized options. | |
UPDATE wp_options SET option_value = "http://localhost:8888" WHERE option_name = "home"; | |
UPDATE wp_options SET option_value = "http://localhost:8888" WHERE option_name = "siteurl"; | |
update wp_postmeta set meta_value = replace(meta_value, 'http://example.com', 'http://localhost:8888') where meta_key='_menu_item_url'; | |
update wp_posts set post_content = replace(post_content, 'http://example.com', 'http://localhost:8888'); |
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
# This script is for shell users who have previously created a database. | |
mkdir ~/installs | |
cd ~/installs | |
wget http://wordpress.org/latest.zip | |
unzip latest.zip | |
cp wordpress/* ~/public_html/ | |
cd ~/public_html/ | |
cp wp-config-sample.php wp-config.php | |
vi wp-config.php |
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
-- Life is better when you can cut and paste | |
-- Post meta | |
------------- | |
-- Site Options | |
------------- | |
select distinct option_name from wp_options; |
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
/* if using this with Genesis, hook this after the loop. | |
The name of the custom field can be hidden, if you provide a metabox for choosing it. | |
The simplest thing is to leave it visible and just use the custom field selector. | |
*/ | |
function tl_attach_category(){ | |
global $post; | |
$attach_option = get_post_meta($post->ID, 'attach_category', true); | |
// You might want to do different things for different categories |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="viewport" content="initial-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<title>Google Maps JavaScript API v3 Example: Marker Simple</title> | |
<link href="https://developers.google.com/maps/documentation/javascript/examples/default.css" rel="stylesheet"> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script> | |
<script> | |
function initialize() { |
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 | |
/* When we're using the event calendar community feature, we need to disable any | |
widget areas that might be displaying extra copies of the form. In theory Modern | |
Tribe will fix this in a future release, but, in the meantime... */ | |
function check_for_event_calendar_pro_router_page(){ | |
global $wp_query; | |
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
<!-- replace the below with this --> | |
<a href="<?php echo esc_url( home_url( '/' ) ); ?>"> | |
<?php if (is_category(1)){ ?> | |
<img src="http://asdfha.jpg" class="header-image" width="" height="" alt="Header 5" /> | |
<?php } else { | |
$header_image = get_header_image(); ?> | |
<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /> | |
<?php } ?> | |
</a> |
OlderNewer