hellau
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Hi,
I have the same problem, plugin doesn’t show up on multisite install. Can you explain how you made it work ?thx
Forum: Plugins
In reply to: [WP RSS Multi Importer] Post thumbnails not displayedOk, problem resolved. The feed url given was “http://www.mydomain.com/feed”. I add “/feed/rss” at the end !
Forum: Fixing WordPress
In reply to: get_terms listing and paginationHey !
Thanks to your advice, i’ve finally came to a solution !Here’s what I did :
$taxonomyName = "scenographie"; $terms = get_terms($taxonomyName, 'parent=67'); function objectToArray($d) { if (is_object($d)) { $d = get_object_vars($d); } if (is_array($d)) { return array_map(__FUNCTION__, $d); } else { // Return array return $d; } } wp_reset_query(); $rows_per_page = 3; $current = (intval(get_query_var('paged'))) ? intval(get_query_var('paged')) : 1; //echo "current ==> ".$current; global $wp_rewrite; $pagination_args = array( 'base' => @add_query_arg('paged','%#%'), 'format' => '', 'total' => ceil(count($terms)/$rows_per_page), 'current' => $current, 'show_all' => false, 'type' => 'list', 'prev_next' => true, 'prev_text' => __('«'), 'next_text' => __('»') ); 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')); $start = ($current - 1) * $rows_per_page; $end = $start + $rows_per_page; $end = (count($terms) < $end) ? count($terms) : $end; echo '<br />'; for ($i=$start;$i < $end ;++$i ) { ?> <?php $term = $terms[$i] ?> <div id="post-<?php the_ID();?>" class="posts"> <div class="scene-list-thb"> <?php $tax_term_id = $term->term_taxonomy_id; $images = get_option('taxonomy_image_plugin');?> <a href="<?php echo get_term_link($term->slug,$taxonomyName)?>" title="<?php echo $term->name ?>"> <?php echo wp_get_attachment_image( $images[$tax_term_id], 'scenes-thb' );?> </a> </div> <div class="scene-infos <?php if(!has_post_thumbnail()) : ?>full<?php endif; ?>"> <h2><a href="<?php echo get_term_link($term->slug,$taxonomyName)?>" title="<?php echo $term->name ?>"><?php echo $term->name ?></a></h2> <div class="scene-desc"> <p> <?php $termDesc = $term->description; echo truncate($termDesc, 650, "...", true); ?> </p> </div> <a class="scene-details" href="<?php echo get_term_link($term->slug,$taxonomyName)?>">Voir le détail de cette scène</a> </div> </div> <?php } ?> <?php echo "<div class='pagination scenes-pagination'>"; echo paginate_links($pagination_args); echo "</div>"; ?>I got an none working pagination at the beginning, and i juste add “wp_reset_query()” before that code, and it worked.
Thx again 😉
Viewing 3 replies - 1 through 3 (of 3 total)