Connect with us

Tips & Tricks

Can′t add pagination on WooThemes Thick Theme

Published

on

Everything I have tried has led to nothing. And I have tried six way’s from Sunday to get my main posts to paginate.

example one:

<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; 
query_posts('offset=1&showposts=' . get_option('woo_other_entries') . '&cat=-' . $GLOBALS['ex_asides'] . '&paged=$paged' ); ?>

example two:

<?php 
global $myOffset; 
global $wp_query;
$myOffset = 1;
$paged = intval(get_query_var('paged')) ? get_query_var('paged') : 1;
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query(array(
	'offset' => $myOffset,
	'category__not_in' => array($GLOBALS['ex_asides'],7,84),
	'paged' => $paged,
	'showposts' => get_option('woo_other_entries'),
	)); ?>

example three:

<?php 
global $myOffset;
$myOffset = 1;
$wp_query = new WP_Query();
$wp_query->query(array(
	'offset' => $myOffset,
	'category__not_in' => array($GLOBALS['ex_asides'],7,84),
	'paged' => $paged,
	'showposts' => get_option('woo_other_entries'),
	)); ?>

And after those tries, I just can’t get more pages beyond the option’s that I choose, and can only pull an archive via the browse more link.

Any suggestions or anything?

Continue Reading
Click to comment

You must be logged in to post a comment Login

Leave a Reply

Tips & Tricks

Add a shortcode

Published

on

This is a simple one.

/**
 * Your Blog title
 *
 */
function my_blog_title() {
	$blogname = get_bloginfo('name');
    return '<span class="blog-title">' . $blogname . '</span>';
}		  	
add_shortcode('blog-title', 'my_blog_title');

Just add this to your functions.php file and then add [blog-title] in any post or page and it will return your Blog Title. :)

Continue Reading

Tips & Tricks

Adding a external file after the first post

Published

on

How might you display a Google ad after the first post or anything you like? It is very simple. You just need to add the variable $loopcounter in the Loop. If the $loopcounter is less than or equal to 1, then include your option. Check out the code:

<?php if (have_posts()) : while (have_posts()) : the_post(); $loopcounter++; ?>

  // your loop

  <?php if ($loopcounter <= 1) { include (STYLESHEETPATH . '/you-file.php'); } ?>

<?php endwhile; ?>

<?php else : ?>

<?php endif; ?>

Pretty simple huh. Well in the $loopcounter line, you may change the include to point to any file or maybe a custom widget like so:

<?php if ($loopcounter <= 1) { dynamic_sidebar( 'Plus Post' ); } ?>

Or use your code directly in between the { & }.

Continue Reading

Tips & Tricks

A simple way to query posts

Published

on

Here is a simple way to call query_posts with an array of options. For all options you my use visit: WordPress Codex.

<?php $my_query = array('showposts' => 4, 'post__not_in' => $do_not_duplicate); ?>

    <?php query_posts($my_query); ?>
Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Matt Farah Net Worth: How Rich is the Car Enthusiast Actually?

Matt Farah Net Worth: How Rich is the Car Enthusiast Actually?

Matt Farah is an American YouTube personality and businessman. He is known for reviewing famous cars on his YouTube channel. As of 2019, Matt Farah net worth is estimated to be $1.5 million. Matt was born on December 1, 1981, in New York City. He attended the University of Pennsylvania where he studied Bachelors of […]

Niko Khale Net Worth: How Rich is Keyshia Cole’s Boyfriend?

Niko Khale Net Worth: How Rich is Keyshia Cole’s Boyfriend?

Things to know about Niko Khale. Niko Khale is an American rapper known for his hit singles “Something Changed About You” and “Truth Is.” He is also known popularly as the boyfriend of Keyshia Cole. As of September 2022, Niko Khale’s net worth is estimated to be $1,600,000. Khale was born on October 17, 1995, […]

Summit1g Net Worth: How Rich is the Twitch Streamer Actually?

Summit1g Net Worth: How Rich is the Twitch Streamer Actually?

Jaryd Russell Lazar, who is better known by his online persona as Summit1g, is an American Twitch streamer. Formerly, he was a Counter-Strike: Global Offensive player who represented teams such as A51 and Team Mythic in different competitions. As of 2019, Summit1g net worth is estimated to be massive $8 million. Yet, later on, he […]

Chris Ramsey Net Worth: How Rich is the English Comedian?

Chris Ramsey Net Worth: How Rich is the English Comedian?

Chris Ramsey is an English comedian and actor. Ramsey is currently participating in the 17th series of Strictly Come Dancing. As of 2019, Chris Ramsey net worth is estimated to be $800,000. Ramsey was born on August 3, 1986, in South Shields, England. He started his career in comedy in 2007 by hosting an open-mic night […]

Trending