How to list posts from a plugin taxonomy?

To query by taxonomy you need to know its query_var that is used in its register_taxonomy() call. It defaults to taxonomy name so usually equal to that. Then you use that info in query argument: query_posts( array( ‘query_var’ => ‘term’ ) ); See Querying by taxonomy in Codex. It is hard to suggest more without … Read more

Translate wordpress date from Italian to English

I do this with the One Backend Language plugin. This way, the WPLANG language is only used in the frontend, and another used in the admin area. There are more plugins that do this, some allow you to choose a language per user. The downside is that you can still be logged in when you … Read more

PHP nested If statement syntax

you can’t run code inside quote since php treats it as string, try this: <?php $newsposts = new WP_Query(‘cat=restaurant’); if ( is_front_page()) { echo ‘<h3 class=”member-review”>Latest Restaurants</h3> <div id=”extra”>’; if ($newsposts->have_posts()) : while ($newsposts->have_posts()) : $newsposts->the_post(); echo ‘<div class=”reslogo”><img src=”‘.catch_that_image().'”/></div>’; endwhile, endif; echo ‘</div>’; } ?>

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.