The concept behind Content Mixx is pretty simple, it takes in a few agruments and spits out records that match those agruments in a random order.
Arguments the it takes in:
- (String) from: possible values and post or page
- (Integer) numberposts: how many records do you want back
- (Integer) categories: what categories do you want to grab from separated by a comma
- (Integer) exclude: what categories do you want to not grab from separated by a comma
Basic Usage
CODE:
-
contentmixx ( 'from=post&numberposts=2&categories=8' )
Use in sidebar
PHP:
-
<?php
-
$myposts = contentmixx( 'from=post&numberposts=2&categories=8' );
-
foreach( $myposts as $post ) {
-
setup_postdata( $post );
-
?>
-
<div class="sideBarPost">
-
<h3><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h3>
-
<p><?php the_excerpt(); ?></p>
-
<p><a href="<?php the_permalink() ?>">Read More...</a></p>
-
</div>
-
<?php
-
}
-
?>
Use in content area
PHP:
back to beginning of this post
back to skip to links
-
<?php
-
$results = contentmixx('numberposts=3');
-
foreach($results as $post) :
-
setup_postdata($post);
-
?>
-
<h2><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h2>
-
<?php the_content(); ?>
-
<?php endforeach; ?>



1. Iva