Insert PHP code in Text

A better, cleaner way to do this would be to use proper string return methods and concatenation. I say this, because you’re trying to put functions that echo content (i.e. the_title() into a variable – this won’t work!!! Instead: $text=”<form><td>Permalink to: “; $text .= get_the_title(); $text .='</td><textarea cols=”85″ rows=”2″ readonly=”readonly” onclick=”select()”/>’; $text .= get_permalink( $id … Read more

Remove Parents From Permalink of Hierarchical Taxonomy

Simply set to false ‘hierarchical’=>true from rewrite parameter in your register_taxonomy. It should looks like this: register_taxonomy(‘places’, ‘post’, array( // Hierarchical taxonomy ‘hierarchical’ => true, ‘labels’ => array( //here your labels ), // Control the slugs used for this taxonomy ‘rewrite’ => array( ‘slug’ => ‘places’, ‘with_front’ => false, // Don’t display the category base … Read more

WordPress permanent links not working (the weird way)

This happened probably because you have … Options +MultiViews … somewhere in your .htaccess or httpd.conf. If there is no directory /contact/ Apache will look for a file with this name and MultiViews matches partial files names. In general MultiViews and WordPress don’t work well together.

post preview/thumbnails not displaying correctly- linking to “home” instead of post?

It sounds like you need a second loop on your home page to call the 3 most recent posts. Try something like this: // Main home page content here <?php $my_query = new WP_Query( array( ‘posts_per_page’ => 3, ‘nopaging’ => true ) ); while ( $my_query->have_posts() ) : ( $my_query->the_post() ); ?> <div id=”preview”> <div … Read more