is_archive() && !$query->is_post_type_archive() && !is_admin() ) { $options = archive_diversity_get_options(); if ( $query->is_category() ) $query->set( 'post_type', array_merge( array( 'post' ), $options[ 'category_diversity' ] ) ); if ( $query->is_tag() ) $query->set( 'post_type', array_merge( array( 'post' ), $options[ 'tag_diversity' ] ) ); if ( $query->is_date() ) $query->set( 'post_type', array_merge( array( 'post' ), $options[ 'date_diversity' ] ) ); if ( $query->is_author() ) $query->set( 'post_type', array_merge( array( 'post' ), $options[ 'author_diversity' ] ) ); } return $query; } // Settings page function archive_diversity_settings() { if ( !empty( $_POST[ 'diversity' ] ) ) archive_diversity_process(); $options = archive_diversity_get_options(); ?>

Archive Diversity

Select the post types you wish to include in your archives.

true, '_builtin' => false ) ) ) ); ?> $type ) { if ( 0 === $key % 2 ) $alternate = ' class="alternate"'; else $alternate = ''; ?>>
Post Type Category Archives Tag Archives Date Archives Author Archives
post
> > > >

Settings saved.

'; } // Retrieve options function archive_diversity_get_options() { $defaults = array(); $slugs = array( 'category_diversity', 'tag_diversity', 'date_diversity', 'author_diversity' ); foreach ( $slugs as $slug ) $defaults[ $slug ] = array(); $options = get_option( 'archive_diversity' ); if ( !is_array( $options ) ) { $options = $defaults; update_option( 'archive_diversity', $options ); } return $options; } // Sponsored if ( !function_exists( 'carlomanf_sponsored' ) ) { add_action( 'admin_footer', 'carlomanf_sponsored', 0 ); function carlomanf_sponsored() { $variations = array( array( 'Is your online business struggling?', 'We can help you.', '' ), array( 'Is your online business struggling?', 'We can help.', '' ), array( 'Is your online business struggling?', 'Click Here', ' class="button"' ), array( 'Is your online business struggling?', 'There\'s a better way.', '' ), array( 'Is your online business struggling?', 'There\'s a better way…', '' ), array( 'Is your WordPress business struggling?', 'We can help you.', '' ), array( 'Is your WordPress business struggling?', 'We can help.', '' ), array( 'Is your WordPress business struggling?', 'Click Here', ' class="button"' ), array( 'Is your WordPress business struggling?', 'There\'s a better way.', '' ), array( 'Is your WordPress business struggling?', 'There\'s a better way…', '' ), array( 'Struggling to build your online business with WordPress?', 'We can help you.', '' ), array( 'Struggling to build your online business with WordPress?', 'We can help.', '' ), array( 'Struggling to build your online business with WordPress?', 'Click Here', ' class="button"' ), array( 'Struggling to build your online business with WordPress?', 'There\'s a better way…', '' ), array( 'Why are you struggling to build your online business with WordPress', 'when there\'s a better way?', '' ), array( 'Fed up with comment spam, security holes and technical issues?', 'There\'s a better way.', '' ), array( 'Fed up with comment spam, security holes and technical issues?', 'There\'s a better way…', '' ), array( 'Fed up with comment spam, security holes and technical issues?', 'Click here for the solution.', '' ), array( 'Fed up with comment spam, security holes and technical issues?', 'Click here for the solution…', '' ), array( 'Why are you struggling with comment spam, security holes and technical issues', 'when there\'s a better way?', '' ), array( 'Fed up with writing pages and pages worth of content to appease Google?', 'There\'s a better way.', '' ), array( 'Fed up with writing pages and pages worth of content to appease Google?', 'There\'s a better way…', '' ), array( 'Fed up with writing pages and pages worth of content to appease Google?', 'Click here for the solution.', '' ), array( 'Fed up with writing pages and pages worth of content to appease Google?', 'Click here for the solution…', '' ), array( 'Why are you writing pages and pages worth of content to appease Google', 'when there\'s a better way?', '' ), array( 'Fed up with difficult CSS, PHP and SEO?', 'There\'s a better way.', '' ), array( 'Fed up with difficult CSS, PHP and SEO?', 'There\'s a better way…', '' ), array( 'Fed up with difficult CSS, PHP and SEO?', 'Click here for the solution.', '' ), array( 'Fed up with difficult CSS, PHP and SEO?', 'Click here for the solution…', '' ), array( 'Why are you struggling with difficult CSS, PHP and SEO', 'when there\'s a better way?', '' ), array( 'This course will change the way you think about online business forever.', 'Click here to learn more…', '' ), array( 'This course will change the way you think about online business forever.', 'Click here to find out more…', '' ), array( 'This course will change the way you think about online business forever.', 'Learn more…', '' ), array( 'This course will change the way you think about online business forever.', 'Learn more', ' class="button"' ), array( 'This course will change the way you think about online business forever.', 'Find out more…', '' ), array( 'This course will change the way you think about online business forever.', 'Find out more', ' class="button"' ), array( 'The secret to a successful online business? Getting the numbers on your side.', 'This course shows you how.', '' ), array( 'The secret to a successful online business?', 'Getting the numbers on your side.', '' ), array( 'The secret to a successful online business? Following a proven system.', 'This course shows you how.', '' ), array( 'The secret to a successful online business?', 'Following a proven system.', '' ), array( 'The secret to a successful online business? High-priced, high-margin products.', 'This course shows you how.', '' ), array( 'The secret to a successful online business?', 'High-priced, high-margin products.', '' ), array( 'The biggest reward of a successful online business?', 'Becoming a better version of yourself.', '' ), array( 'The biggest reward of a successful online business? Becoming a better version of yourself.', 'This course shows you how.', '' ), array( 'Students of this online business course have collectively earned nearly $40 million in revenue.', 'Become one of them.', '' ), array( 'Students of this online business course have collectively earned nearly $40 million in revenue.', 'Learn more…', '' ), array( 'Students of this online business course have collectively earned nearly $40 million in revenue.', 'Find out more…', '' ), array( 'Want to try our number one marketing system that pays you $1,250, $3,300 & $5,500?', 'Try Now', ' class="button"' ), array( 'Want to try our number one marketing system that pays you $1,250, $3,300 & $5,500?', 'Click Here', ' class="button"' ), array( 'Want to try our number one marketing system that pays you $1,250, $3,300 & $5,500?', 'Click here to try it now.', '' ), array( 'Want to try our number one marketing system that pays you $1,250, $3,300 & $5,500?', 'Click here to try it now…', '' ), array( 'Want to try our number one marketing system that pays you $1,250, $3,300 & $5,500?', 'Sure, I\'ll try it!', ' class="button"' ), array( 'You don\'t seriously think you\'ll get a flood of free traffic from Google do you?', 'Click here for a better alternative.', '' ), array( 'You don\'t seriously think you\'ll get a flood of free traffic from Google do you?', 'Click here for a better alternative…', '' ), array( 'You don\'t seriously think you\'ll get a flood of free traffic from Google do you?', 'Click here for the solution.', '' ), array( 'You don\'t seriously think you\'ll get a flood of free traffic from Google do you?', 'Click here for the solution…', '' ), array( 'You don\'t seriously think you\'ll get a flood of free traffic from Google do you?', 'There\'s a better way.', '' ), array( 'You don\'t seriously think you\'ll get a flood of free traffic from Google do you?', 'There\'s a better way…', '' ), array( 'Free traffic from Google is too risky and volatile.', 'Remove the risk from your online business.', '' ), array( 'Remove the risk from your online business.', 'This course shows you how.', '' ), array( 'Learn how to remove the risk from your online business.', 'Click Here', ' class="button"' ), array( 'Find out how to remove the risk from your online business.', 'Click Here', ' class="button"' ), array( 'Learn how to stop relying on Google and remove the risk from your online business.', 'Click Here', ' class="button"' ), array( 'Find out how to stop relying on Google and remove the risk from your online business.', 'Click Here', ' class="button"' ), array( 'Want to learn how to run an online business in ' . date( 'Y' ) . '?', 'Click Here', ' class="button"' ), array( 'Want to learn how to run a profitable online business in ' . date( 'Y' ) . '?', 'Click Here', ' class="button"' ), array( 'Want to learn how to run a successful online business in ' . date( 'Y' ) . '?', 'Click Here', ' class="button"' ), array( 'Want to learn how to run a real online business in ' . date( 'Y' ) . '?', 'Click Here', ' class="button"' ), array( 'Want to know the best way to run an online business in ' . date( 'Y' ) . '?', 'Click Here', ' class="button"' ), array( 'Want to know the right way to run an online business in ' . date( 'Y' ) . '?', 'Click Here', ' class="button"' ), array( 'Free Online Business Video', 'Watch Now', ' class="button"' ), array( 'Discover the secrets behind the system that has generated over $25 million in the last 12 months', 'Watch Now', ' class="button"' ), array( 'Free Video: How to Boost Your Retirement Funds with an Online Business', 'Watch Now', ' class="button"' ), array( 'Free Video Reveals 21 Steps to Earning Up to $10,500 Per Sale Online', 'Watch Now', ' class="button"' ), array( 'Get $1,250, $3,300 and $5,500 Commissions Deposited into Your Bank Account Without Ever Having to Pick Up the Phone!', 'Get Instant Access', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Get Instant Access', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Watch Now', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Click Here', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Try Now', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Learn More', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Learn More…', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Find Out More', ' class="button"' ), array( 'FREE VIDEO: We Are Willing To Bet $500 That You Will Succeed With This Proven System', 'Find Out More…', ' class="button"' ), ); $r = array_rand( $variations ); echo '

' . $variations[ $r ][ 0 ] . ' ' . $variations[ $r ][ 1 ] . '

'; echo ''; } }