This certainly should be possible, but might require a fair amount of coding. Email me at mac =at= mcdspot =dot= com to discuss.
Thanks for replying.
I figured out a way to use a custom taxonomy for the Series.
Here
If I want to list all the Series names, the only way I know to do that is by using:
wp_tag_cloud( array( 'taxonomy'=>'sermonseries' , 'format'=>'list',
'smallest' => 12,
'largest' => 12) );
Is there a way to paginate the wp_tag_cloud results?
Would I need to look into wp_query for a custom query in order to make this work?
I can’t seem to find many posts on paginating wp_tag_cloud or wp_list_categries results.
Thanks again!
Luis
You can change the wp_tag_cloud call slightly to return an array:
$tags = wp_tag_cloud( array( 'taxonomy'=>'sermonseries' , 'format'=>'array',
'smallest' => 12,
'largest' => 12,
'echo' => false) );
Then you can use paginate_links() to paginate the $tags array.
Sample code for paginate_links:
// Test the use of paginate_links
$rows_per_page = 7;
$current = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : 1;
$rows = $wpdb->get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'");
global $wp_rewrite;
$pagination_args = array(
'base' => @add_query_arg('paged','%#%'),
'format' => '',
'total' => ceil(sizeof($rows)/$rows_per_page),
'current' => $current,
'show_all' => false,
'type' => 'plain',
);
if( $wp_rewrite->using_permalinks() )
$pagination_args['base'] = user_trailingslashit( trailingslashit( remove_query_arg('s',get_pagenum_link(1) ) ) . 'page/%#%/', 'paged');
if( !empty($wp_query->query_vars['s']) )
$pagination_args['add_args'] = array('s'=>get_query_var('s'));
echo paginate_links($pagination_args);
$start = ($current - 1) * $rows_per_page;
$end = $start + $rows_per_page;
$end = (sizeof($rows) < $end) ? sizeof($rows) : $end;
echo '<br />';
for ($i=$start;$i < $end ;++$i ) {
$row = $rows[$i];
echo "I:$i ID:{$row->ID} Title:{$row->post_title} <br />";
}
Cool thanks!
I’ll give it shot.
I ended up creating a custom query like:
$query = "SELECT * FROM wp_terms,wp_term_taxonomy WHERE wp_terms.term_id=wp_term_taxonomy.term_id AND wp_term_taxonomy.taxonomy='sermonseries'";
And I used This easy PHP pagination code for the paging.
However, I will still try to implement your code.
Thanks again!
Luis
Glad it is working! Now, please use the dropdown at top right to mark this topic ‘Resolved’.