Custom template for different post types

I’d recommend Custom Post Types : http://codex.wordpress.org/Post_Types#Custom_Post_Types You can add appropriate meta boxes to each post type : http://codex.wordpress.org/Function_Reference/add_meta_box You can define specific front end templates for each post type : http://codex.wordpress.org/Post_Types#Custom_Post_Type_Templates Instead of a dropdown, you would have distinct menu items for each “thing” ( Review, Albums, etc ).

Is it possible to return a specific tag archive/template as one of the search results?

A simple way to do is to edit your theme’s “search.php” (copying it from the parent theme into your child theme’s directory first if you’re using a child theme) and then before the posts loop putting something like: <?php if ( $tag = get_term_by( ‘name’, get_search_query(), ‘post_tag’ ) ) { ?> <article><!– or whatever is … Read more

Category template not displaying all post formats

Reading the codex on get_template_part and get_post_format will help you a lot here. It’s hard to say for sure without knowing what files are in your theme but get_template_part( ‘content’, get_post_format() ); is essentially saying use the template named content-format.php, where format is one of image, video, gallery etc. One of a few things is … Read more

Including Custom Template on template_include Filter not working

I would suggest you copy page.php into your custom template, and then modify the code as required. At the very least, your template should look something like: <?php get_header() ?> <?php while ( have_posts() ) : the_post() ?> <article <?php post_class() ?>> <?php the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ) ?> <div class=”entry-content”> <?php the_content() ?> </div> … Read more

Where is search.php?

Normally, copying index.php file for the theme as search.php will let you have a new base template to work off of with the same styles and look as your theme, assuming the theme implemented index.php decently. That would give you a solid start to be able to make changes to provided nothing is using a … Read more

Displaying External Data – Not Posts

You can hook the content of any post and request data you want through WordPress HTTP API. Like this: add_filter(‘the_content’, ‘my_content_178750’, 1, 99); function my_content_178750($content) { return wp_remote_retrieve_body(wp_remote_get(‘http://example.com’)); } Also there is possibility to check path you’re on and decide what you want to get depending on that.

Allow arbitrary text after page URL

This approach is not advisable as http://example.com/page/whatever-information/ is how WordPress deals with child pages and .htaccess Rewrites is part of how WordPress identifies what page is being requested and what queries to run. You should probably pass the whatever-information as something called a POST variable, then have code that runs on page and parses these … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)