Custom post type archive category page results in 404

Two things: You shouldn’t be using ‘category’ as a slug, since it’s already built into WP and thus is reserved (http://codex.wordpress.org/Function_Reference/register_taxonomy#Reserved_Terms) Pretending for a moment that it isn’t reserved, the base URL structure wouldn’t contain the post type in front of it. EDIT I just realized you didn’t set the archive slug itself. Instead of … Read more

How to remove the tripadvisor logo from the wordpress theme?

If you open header.php and remove line 96: <a class=”ta-bug” title=” TripAdvisor ” href=”http://tripadvisor.com”><img src=”<?php echo get_stylesheet_directory_uri(); ?>/images/TA_bug.gif”></a>, it will be gone. I cannot speak to the legality of this with certainty, but by my understanding of GPL2.0, you should be set.

Custom /Page/2/ Template Only

PHP has the $_SERVER[] variable, you can use this to get just about anything contained in the URL, you’ll probably want to look at PATH_INFO as a launching point. You can use strpos() (or, if you want to have better results, preg_match()) to check whether or not the string you get from $_SERVER[] contains the … Read more

Translate custom template with WPML

To translate custom page templates you must select “Synchronize page template” in WPML options. For it to actually work the page template markup must be localized or internationalized using a recognized format, for example http://codex.wordpress.org/I18n_for_WordPress_Developers, and then have an accompanying .mo/.po file . WPML also has an addon called “String Translation module” which can scan … Read more

How to sort a loop after most viewed

Having taken a quick look at the wp-postviews documentation, it seems you can change query_posts( ‘posts_per_page=5’ ); to query_posts( ‘posts_per_page=5&v_sortby=views&v_orderby=desc’ );, but I haven’t tested that. Give it a shot and see how it turns out. A cautionary note on doing this: What often happens when you sort by views is that the first page … Read more

Need help with my template [closed]

There are a few things that you need to look at After your third video there is <div class=”clear”></div> That is forcing the 4th and 5th video onto a new line. Remove this. You also need the containing box to be big enough to hold 5 video’s in a row therefore in the css you … Read more

Function to allow single post template based on custom taxonomy?

I think what you’re looking for is the WordPress Template Hierarchy. Basically you can just name the template single-{custom-post-slug}.php and put it in the right directory. Update Now that I understand what you’re actually asking: I bet you could hook {$type}_template, which is called by get_query_template(). It’s expecting a path to the template which has … Read more