It can be somewhat annoying that WP automatically inserts <p> tags into your posts and pages via the WYSIWYG editor. In order to 86 this functionality you can just add remove_filter ('the_content', 'wpautop'); to your functions.php file. You'll now have to add paragraph tags manually but if you're semi-savvy with basic html, that shouldn't be an issue.
I found all sorts of complicated posts on the in-ter-net about this but none were clear and concise. Hopefully this will be… (but I'm no Flash expert) I basically needed to pass an xml file path to a Flash image rotator through the embed/object markup in the html file. Using FlashVars this is actually pretty easy in AS3. note: I usually use swfobject to work with Flash but this particular project called for the more "traditional" embed/object tags.
The html markup…
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="348" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="wmode" value="transparent" /><param name="FlashVars" value="xml_path=xml/news2.xml" /><param name="src" value="preview.swf" /><param name="flashvars" value="xml_path=xml/news2.xml" /><embed type="application/x-shockwave-flash" width="640" height="348" src="preview.swf" flashvars="xml_path=xml/news2.xml" wmode="transparent" quality="high"></embed></object>
The ActionScript code…
root.loaderInfo.parameters.xml_path;
(or if you need it in a variable…)
var xmlFilePath:String = root.loaderInfo.parameters.xml_path;
Hope that helps someone.
Had the oddest thing happen today; The spacebar and option keys stopped working while I was using Illustrator CS4. I did a little searching and testing and found that Firefox (v3.6) was the culprit. I quit FF and the spacebar/hand tool/option keys were back! I was able to restart Firefox and everything is still working fine with both programs running. I'm sure other programs could cause this issue as well. Odd bug that can drive you crazy. Makes you realize how important that little spacebar is.
This gets placed in your theme's functions.php… 'Signup' is the text for the register link in this example. 'Logout' is the message displayed when the user is logged in. That could easily be a link to their profile or the admin area as well.
add_action( 'register' , 'register_replacement' );
function register_replacement( $link ){
if ( ! is_user_logged_in() ) {
if ( get_option('users_can_register') )
$link = $before . '<a href="' . site_url('wp-login.php?action=register', 'login') . '">' . __('Signup') . '</a>' . $after;
else
$link = ";
} else {
$link = $before . '<a href="' . wp_logout_url() . '">' . __('Logout') . '</a>' . $after;
}
return $link;
}
login-lockdown – protect your neck
nextgen gallery – great for internally managed photo galleries
tubepress – let youtube handle the bandwidth and conversion please.
eventsmanager (for RSVP type events)
gigpress (for musician-style tours)
capabilities manager – if you have multiple content editors with varying roles.
Mail From – change the default from email address and name.
exclude-pages – sometimes the main nav doesn't need to be that cluttered
user photo – great for adding some personality especially with multiple content authors
maintenance mode – show users something professional while testing and updating
shadowbox js / lightbox PLUS – sexy photo/video presentation
advanced twitter widget – meh. it works well for client managed twitter feeds.
Register Plus – get all the info you can from your users
all in one SEO pack – what good is a site if no one finds it
kadom-ads-management – if you have savvy enough admins to manage their own ad space
wp super cache – great for high-traffic sites but can cause issues with some plugins
formbuilder – submits forms via email and to the db. export to csv. nice.
FeedBurner FeedSmith – if you're into feedburner for rss feed management. This plugin works excellently.
With the release of WordPress 2.9, there have been a couple nice little enhancements to excerpts. It's now very easy to change the good old [...] to whatever you'd like including a simple "More" link that links to the post. It's also now just as easy to control the length of the excerpts as well. Simply use the code below as a starting point. Place this code in your theme's functions.php
function new_excerpt_more($more) {
return '… <a href="'.get_permalink().'">MORE</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
function new_excerpt_length($length) {
return 30;
}
add_filter('excerpt_length', 'new_excerpt_length');
I love WordPress and I use it pretty much exclusively for small to mid-sized website development. WordPress development is quick, easy and website owners love the fact that there's none of the complications that come with proprietary content management systems. Sometimes it becomes necessary to move your beloved WordPress sites to other servers or directories. I've found many online resources elaborating on this topic including the WordPress docs themselves. I prefer to have a quick reference guide for my own purposes though. I've given credit and links where applicable.
If you're moving a WordPress site to a different server or a different directory on the current server there are several steps to go through to ensure that everything works correctly on the other side of the move.
The Database Edits: (from My Digital Life)
SQL From phpMyAdmin or similar: (in phpMyAdmin go to the top level of the database by clicking on the db name and click on the "SQL" tab. don't forget to add the appropriate db table prefix if different from the default wp_ )
UPDATE wp_options SET option_value = replace(option_value, 'http://www.old-domain.com', 'http://www.new-domain.com') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://www.old-domain.com','http://www.new-domain.com');
UPDATE wp_posts SET post_content = replace(post_content, 'http://www.old-domain.com', 'http://www.new-domain.com');
On occasion you may need to add this to your config.php file: (from the WordPress Codex)
define('WP_HOME','http://www.new-site-location.com');
define('WP_SITEURL','http://www.new-site-location.com/subdirectory-if-applicable');
Sometimes it's necessary to update permalinks by simply going to SETTINGS > PERMALINKS and clicking on SAVE CHANGES. you don't have to change anything, just click the button. Not sure why but it works.
The WordPress Codex has a detailed article on moving WordPress available.
Don't forget to check your theme files (and Flash!) for hard-coded file paths.
I'm currently on a Media Temple DV 3.5 hosting server and I design and develop using wordpress a lot. WP seems to work great on shared servers as far as the auto upgrades, installing plugins and uploading media. However, WordPress installs on my server always required me to use an FTP program to temporarily change directory permissions to 777 in order to upgrade WP itself or plugins and I had various issues uploading media through the media manager. Even then, I still had to input the FTP password in the WordPress backend. This gets to be a pain if you're actively using a WordPress as a Content Management System. Of course leaving directory permissions at 777 is not a valid option so I did a little digging and found that several other people had the same issue.
I had previously used suPHP to take care of this but there's a much easier solution found on the MT forums… https://forums.mediatemple.net/viewtopic.php?id=4413 – This solution uses FastCGI+SuExec to allow php scripts to fix permissions issues on a media temple dv server. It's fairly easy to accomplish and isn't quite as messy as installing suPHP.
UPDATED 11/7/09
I have linked to an article below that sheds some light on the whole washed-out color when using Photoshop's Save For Web. I'm not an expert on color space this and profile that. I just want to design in Photoshop and create an optimized image that looks like what I designed. I recently upgraded to CS4 and I've found that this is much easier in this newer version of Photoshop.
I have Photoshop CS4 set to ask me about profile mismatches (under EDIT > COLOR SETTINGS), and if I'm working on an image for the web I just "discard the embedded profile (don't color manage)" when it asks me upon opening an image. Then I'm able to just uncheck the "Convert to sRGB" checkbox in the Save for Web" dialog window and everything usually turns out great.
When I was using Photoshop CS2, consistent color via save for web seemed to be much harder to achieve. A few tricks (mentioned in the article below) are to make sure your document is using the sRGB-IEC61blahblah2.1 profile. Find this under EDIT > COLOR SETTINGS and EDIT > CONVERT TO PROFILE if your doc isn't using that profile. Also the preview mode is something that threw me for a loop. Make sure you're viewing your doc in the correct preview mode. Find this under VIEW > PROOF SETUP and assign to sRGBIEC61… via CUSTOM if need be. You might also want to uncheck the ICC profile checkbox in the Save For Web dialog window.
I think all of this has to do with how browsers handle (or don't handle) color profiles. It's all more than I care to deal with to be honest so I just do what works and I'm not sure how or why it works. Terrible I know but I've got better things to spend my time on than figuring out why Photoshop does things the way it does. Plus I've read so many conflicting articles on the subject I feel I've spent enough time trying to figure it out.
here's the article on Photoshop save for web color shift from CreativePro.com.
Hope this helps someone.
to exclude a certain category of posts from the WP loop:
<?php query_posts("cat=-46″); ?>
<?php if (have_posts()) : ?>
blah blah blah. and then close with the old:
<?php
//Reset Query
wp_reset_query();
?>
To exclude certain categories from an RSS feed on another webpage (like a non-wp homepage):
http://yourdomain.com/blog/feed/?cat=-46
just compose your post in the visual editor and when you're done – ONLY WHEN YOU'RE COMPLETELY DONE WRITING THE CODE – switch to the html editor… viola! <?php echo "damn that's easy"; ?>
probably not the greatest if you have to come back and edit that code but it works for a quick fix without a plugin.
from: http://www.redswish.co.uk/the-power-of-wordpress-custom-fields/
The key is the name for your custom variable, and the value is, well, it’s value! When you create a custom field, you are creating new meta-data. You then insert a simple line of php into your WordPress template where you want this extra data to appear in the theme and voila! You’re done.
<?php $values = get_post_custom_values("Subtitle"); echo $values[0]; ?>
or for thumbnails/images from a certain directory: (just add the image name.ext as the custom field value
<img src="/blog/wp-content/uploads/<?php $values = get_post_custom_values('blog-image'); echo $values[0]; ?>" alt="" />