Query for multiple post types does not work

I’d like my frontpage to display a list of my lastest blog posts merged with my latest “Products” custom post type posts. From the documentation i gather this should work: query_posts( array(‘post_type’ => array(‘post’, ‘product’) ) ); while (have_posts()) : the_post(); the_title(); the_excerpt(); endwhile; But that turns a weird list, made of pages ! Note … Read more

Call to undefined function issue

I know there are other, maybe better ways to do what I want to achieve, but I have to use this solution. I have two stylesheets: style.css – normal stylesheet style-dynamic.php – dynamic stylesheet linked to the first one I’m using some PHP code in the second one, like: #body { background-color: <?php echo get_option(‘theme_background’); … Read more

wp_link_page – wrap current page element

I’m trying to make something more meaningful out of the wp_link_pages() result: $paged_page_nav = wp_link_pages( array( ‘echo’ => false ) ); // Now let’s wrap the nav inside <li>-elements $paged_page_nav = str_replace( ‘<a’, ‘<li class=”‘.$classes.'”><a’, $paged_page_nav ); $paged_page_nav = str_replace( ‘/a>’, ‘/a></li>’, $paged_page_nav ); // here I’d need to wrap the currently displayed page element … Read more

Duplicate attribute class causing site validation error

The following bit of code results in a duplicate attribute site validation error. This template script: <div class=”clearfix” <?php post_class() ?>> produces this source output: <div class=”clearfix” class=”post-263 post type-post status-publish format-st… WordPress adds its own post-related classes to format the blog entry. Is there any way I can add my “clearfix” class to the … Read more