Extend page routing with custom parameters

In your case you need to register custom post type for your projects. You can do it by using register_post_type function: add_action( ‘init’, ‘wpse8170_register_post_type’ ); function wpse8170_register_post_type() { register_post_type( ‘wpse8170-projects’, array( ‘label’ => ‘Projects’, ‘public’ => true, ‘rewrite’ => array( ‘slug’ => ‘project’ ), ) ); } Don’t forget to flush rewrite rules. After you … Read more

Trying to display stick or featured post on homepage

Try this. It should work <?php $args = array( ‘post__in’ => get_option(‘sticky_posts’), ‘showposts’ => 1, ‘orderby’ => date, ‘order’ => ‘desc’ ); $sticky = new WP_Query( $args ); if ( $sticky->have_posts() ): while ( $sticky->have_posts() ): $sticky->the_post(); echo the_title(); endwhile; endif; wp_reset_query(); ?>

Outputting a custom field in PHP

Setting the third parameter of get_post_meta to true does not guarantee that you get a string. What that parameter does is control how many rows of the database get returned. When true you only get a single result and not an array of all of the rows in the database that match. You will get … Read more

Additional Sidebar

Your function seems fine and it’s probably hooked on init : add_action(‘init’,’blankslate_widgets_init’) function blankslate_widgets_init() { //code } But in your theme you probably want to add some checking : <?php if (is_active_sidebar(‘left-sidebar’)) dynamic_sidebar(‘left-sidebar’); ?> I would use left-sidebar instead left_sidebar as sidebar ID perhaps.

Pretty links for PHP pages above WP /blog directory?

Go to your Admin Dashboard. Click on the Settings menu (or icon). Go to the General sub menu. The WordPress Address (URL) should match the Site Address (URL) Remove /blog form the Site Address (URL) Click the Save Changes button. Read Giving WordPress Its Own Directory for more details.