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 | |
ob_start(); | |
include ‘file.php'; | |
$output = ob_get_clean(); | |
$output = str_replace(array("\r", "\n"), '', $output); | |
return $output; | |
?> |
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 next_posts_link('Older Posts'); ?> | |
<?php previous_posts_link('Newer Posts'); ?> |
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
// turn privacy setting off in Wordpress | |
UPDATE wp_options SET option_value = "1" WHERE option_name = "blog_public"; | |
//change home and siteurl values | |
UPDATE wp_options SET option_value = "http://www.domain2.com" WHERE option_name = "home"; | |
UPDATE wp_options SET option_value = "http://www.domain2.com" WHERE option_name = "siteurl"; | |
// sweep options, post_content, and guid for references to old url | |
UPDATE wp_options SET option_value = REPLACE(option_value,'www.domain1.com','www.domain2.com'); | |
UPDATE wp_posts SET post_content = REPLACE(post_content,'www.domain1.com','www.domain2.com'); | |
UPDATE wp_posts SET guid = REPLACE(guid,'www.domain1.com','www.domain2.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
<a href="tel:1-555-555-5555">1-555-555-5555</a> |
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
UPDATE cms_content_props SET content = REPLACE(content,'find','replace'); |
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 if ( is_paged() ) { ?> | |
<meta name="robots" content="noindex,follow" /> | |
<?php } ?> |
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 | |
//assumes you have a locations.php file in your plugin folder | |
function advnap_kml() { | |
$url = str_replace( trailingslashit( site_url() ), '', plugins_url( '/locations.php', __FILE__ ) ); | |
add_rewrite_rule( 'locations\\.kml$', $url, 'top' ); | |
} | |
add_action( 'wp_loaded', 'advnap_kml' ); | |
function advnap_plugin_activate() { | |
flush_rewrite_rules(); |
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
grep -lr "text-you-are-searching-for" . |
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
mysqldump db_name table_name > table_name.sql |