Custom rewrites for pages and categories

If you want to have domain.tld/PAGE-NAME.php then you could just use %postname%.php as custom structure. // Edit As this approach seems to work for posts only, you might have a try with the structure /%postname%/. In addition, you put the following lines to your .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^(.*).php /$1/ [R=301,L] </IfModule> // … Read more

Apply custom taxonomy archive template to children

As you can see in this image, template hierarchy limits to taxonomy-$taxonomy-$term.php. I don’t know why a subterm falls back to taxonomy-$taxonomy.php, but I guess it searches for a taxonomy-$taxonomy-$term.php in wich $term would be workshops, science labs and so on. And since those don’t exist (I suppose), it falls back on taxonomy-$taxonomy.php. You could … Read more

Loop not showing up on page template

Firstly, use WP_query instead of query_posts: Secondly, for (static) pages use the variable ‘page’ (not ‘paged’). $my_query = new WP_query( ‘post_type=post&posts_per_page=5&paged=’ .get_query_var(‘page’) ); if ( $my_query->have_posts() ) while( $my_query->have_posts() ) : $my_query->the_post(); the_title(); endwhile;

How to echo a different field if another field is empty?

You might try to replace the foreach( $myCarousel as $carousel ) with: foreach($myCarousel as $carousel){ $myimg = get(‘projectdetails_image’,1,$carousel); if ( !$myimg ) { // use this if you want to show a default image when no image is available in the post $myimg = get_template_directory_uri().’/images/default_banner.jpg’; } if ( $myimg ) { echo “<div class=”item”.( $counter … Read more

Built-in Method to Extract Embedded Video from Content

It looks like the closest you get is in the WP-Embed class: autoembed( $content ); It says it extracts urls which are on distinct lines (like you’d put a url in for embedding it), but it then passes it to WP_Embed::shortcode(). Not quite what you want. You could dig into WP_Embed::shortcode() to see if you … Read more

I keep getting Javascript error messages

You have a LOT of plugins on your blog with associated javascript files. The chance that two are conflicting is always present, so you could try and disable the plugins and then enable then one by one (beginning with the most important ones) until you find the one that’s generating errors. That way you can … Read more