RTL Stylesheet Confusion with WordPress

This guy explains it fairly well for wordpress (video, no transcript): Yoav Farhi: Right to Left WordPress. The WordPress Manual (Codex) has as well some information regarding Right to Left Language Support.

Value prints outside of the echo

This is how I would code this: $url = get_post_meta( get_the_ID(), ‘mblink’, true ); if ( ! empty( $url ) ) { print ‘<a href=”‘ . esc_url( $url ) . ‘”>MBLINK</a>’; }

WordPress Theme Modification Help

Posting this as a separate answer, because it’s actually different from @Keoki Zee’s answer. You do need to create a custom menu, but you do not need to use a custom link. Go to Dashboard -> Appearance -> Menus If necessary, Create a new menu Add whatever Pages to the menu that you want To … Read more

single.php error

Looks like you are using this theme: Atmosphere 2010 Looking through the theme files the function atmosphere_posted_on is used a couple times in loop.php and single.php. The undefined function error indicates that the function does not exist which leads me to believe that your functions.php has been modified or is otherwise missing this function. In … Read more

PHP echo inside javascript

Have a read through this article: Adding Scripts Properly to WordPress Part 2 – JavaScript Localization What you are doing here is passing your PHP values to the WordPress JS localization system. This then allows your JS code to get access to those variables you have passed.

WordPress Specified file failed upload test

You need to add the mime type to the whitelist of allowed file types. Assuming this one still works, you can go the plugin route using. http://wordpress.org/extend/plugins/pjw-mime-config/ Alternatively if you want to add your own mimes in code form, here’s an example. add_filter( ‘upload_mimes’, ‘your_custom_mimes’ ); function your_custom_mimes( $mimes ) { $mimes[‘extensionhere’] = ‘mimetype/goes-here’; return … Read more

“operation successful” message

WordPress makes use of add_settings_error() and related function to setup notifications to display. Using them is not very straightforward, so easier way might be to make use of hooks like admin_notices or all_admin_notices to output your own message and style it in same way as WP does.

Add class to last 3 posts in loop

WP_Query seems to set two variables, $posts and $post_count when running(according to the source over at http://core.trac.wordpress.org/browser/tags/3.2.1/wp-includes/query.php ). You can access these two and work something out to figure out if you’re in the last three posts. var_dump those two to see if there’s a count, add in your own counter and you should be … Read more