A plugin, which allows editing certain template regions [duplicate]

This is standard WP functionality and can be accomplished without a plugin. Using the admin area, create a page called Footer. in you theme’s footer.php file, add the following code inside the main footer <div>. <?php $query = new WP_Query(array(‘pagename’=>’footer’)); while ( $query->have_posts()) : $query->the_post(); the_content(); endwhile; ?> Now any text in the footer ‘page’ … Read more

How to have a category not show up in query post with page panigation?

When using cat in the query you need to specify the category id not name. Try this. <?php $gallery = get_cat_id(‘gallery’); $shirts = get_cat_id(‘shirts’); $hoodies = get_cat_id(‘hoodies’); $excluded_cats=”-“.$gallery.’,-‘.$shirts.’,-‘.$hoodies; $limit = 5; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts( ‘cat=”.$excluded_cats.”&showposts=” . $limit . “&paged=’ . $paged ); ?>

Code that displays images – images get shown multiple times

Something like this might work: <?php $cat_id = get_query_var(‘cat’); $catlist = get_categories(‘hide_empty=0&child_of=” . $cat_id); echo “<ul>”; foreach($catlist as $categories_item) { echo “<h1><a href=”‘ . get_category_link( $categories_item->term_id ) . ‘” title=”‘ . sprintf( __( “View all products in %s” ), $categories_item->name ) . ‘” ‘ . ‘>’ . $categories_item->name.'</a> </h1> ‘; echo ‘<p>’. $categories_item->description; $terms = … Read more

Problems with pagination for a custom post type

Store your new WP_Query() in a variable Globalize $wp_query Move the $wp_query swap-hack to after your new WP_Query() generation Pass the variable to $wp_query, not the new WP_Query() call itself. e.g. <?php // Custom query args $press_query_args = array( ‘post_type’ => ‘press’, ‘orderby’ => ‘post_date’, //’showposts’ => ’10’, ‘posts_per_page’ => $paged, ); // Custom query … Read more