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
update wp_posts set guid = replace(guid, 'simplehelix.com', 'com'); | |
update wp_posts set post_content = replace(post_content, 'simplehelix.com', 'com'); | |
update wp_options set option_value = replace(option_value, 'simplehelix.com', 'com'); | |
update wp_postmeta set meta_value = replace(meta_value, 'simplehelix.com', 'com'); |
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 http-equiv="Content-Type" content="text/html;charset=utf-8" /> | |
<meta name="description" content=""> | |
<meta name="keywords" content=""> | |
<!-- <link rel="stylesheet" href="css/somefile.css" /> --> | |
<!-- <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> --> | |
<title></title> | |
</head> |
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
AddHandler php5-script .html .js .php .htm |
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
$za = new ZipArchive(); | |
$za->open('test.zip'); | |
for ($i=0; $i<$za->numFiles;$i++) { | |
$thing = $za->statIndex($i); | |
echo $thing[name]; | |
echo "<br /><br />"; | |
} |
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 $my_query = new WP_Query('category_name=yournamehere&posts_per_page=1'); | |
while ($my_query->have_posts()) : $my_query->the_post(); | |
$do_not_duplicate = $post->ID; ?> | |
<?php the_title(); ?> | |
<?php the_content(''); ?> | |
<?php endwhile; ?> |
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 echo preg_replace('/<img[^>]+./','',get_the_content()); ?> |
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_HOME','http://'); | |
define('WP_SITEURL','http://'); | |
//add this to the wp-config.php file, omit the trailing slash in the URL | |
//damn helpful if you move a site, and forget to update the site info |
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
*nggallery templates are stored in wp-content/themes/<yourtheme>/nggallery/ | |
*http://nextgen-gallery.com/templates/ | |
[nggallery id=2 template=carousel images=7] //images=7 limits the returned images to seven | |
[nggtags gallery=cologne,wordpress,...] //for tag specific sorting, doesn't seem to support templates |
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
//fontThisTable() inserts font tags before and after all the td tags. Size and style are optional. | |
function fontThisTable($someTable, $fontSize, $fontStyle){ | |
if(!$fontSize){$fontSize = '2';} | |
if(!$fontStyle){$fontStyle = 'Arial';} | |
$someTable = preg_replace('|<td.*?>|', '<td>', $someTable); | |
$someTable = preg_replace('|<td>|', '<td><font face="'.$fontStyle.'" size="'.$fontSize.'">', $someTable); | |
$someTable = preg_replace('|</td>|', '</font></td>', $someTable); | |
return $someTable; |
OlderNewer