Create a page for a theme only

So instead of creating a theme for it i ended up using the template_redirect with an if statement to check the url for a certain thing. function page_redirect() { if ($_SERVER[‘REQUEST_URI’] == $home . ‘/other-sites’) { require(TEMPLATEPATH . ‘/includes/other-sites.php’); } if ($_SERVER[‘REQUEST_URI’] == $home . ‘login’) { require(TEMPLATEPATH . ‘/includes/login.php’); } } add_action(‘template_redirect’, ‘page_redirect’); Simply … Read more

How can I get this request to use the Custom Post Type page template instead?

Switch the taxonomy.php just like you would the single.php to support specific post custom templates. This is untested code, so it may not work – but, first get the post type $post_type = get_query_var(‘post_type’); So if $post_type contains post_type=”car” then include archive-car.php like this: if ( $post_type=”car” ) get_template_part(‘archive-car’); elseif ( $post_type=”boat” ) get_template_part(‘archive-boat’); elseif … Read more

display comment form for specific post id

Use get_comments() and pass the post ID as parameter: $comments = get_comments( array ( ‘post_id’ => 343 ) ); foreach ( $comments as $comment ) { // Just to give you an idea of the available data. // You will probably do something better with it. 🙂 var_export( $comment ); } Related: Bug #20572 ($post_id … Read more

Is there a way of putting the facebook social plugins into page template php files?

Go to Facebook developers site For example, the Like Plugin http://developers.facebook.com/docs/reference/plugins/like/ Generate the code. You’ll get the generated code back in 2 blocks. The first is the SDK that must be added once on your page… preferably after the opening <body> tag. Depending on your theme you can paste that directly into header.php. If you … Read more

Remove Items from Template Homepage

As long as you don’t break the PHP or the HTML markup you can delete anything you want. I’d recommend building a child theme over editing one, and you’d want to steer clear of commercial themes that have restrictions on what you can do to the theme, but otherwise there is no reason you can’t … Read more