Khoiruddin
Forum Replies Created
Viewing 3 replies - 1 through 3 (of 3 total)
-
Forum: Plugins
In reply to: [WP-RTL] WP 3.8, no RTL right buttontberin
inside
wp-rtl/wp-rtl.php
??
solveigm > You are wellcome ??
Try my crazy script inside
author.php
on your theme ?? :<?php $curauth = (isset($_GET['author_name'])) ? get_user_by('slug', $author_name) : get_userdata(intval($author)); global $current_user; get_currentuserinfo(); $meta_query = mysql_query(" SELECT distinct($wpdb->usermeta.meta_value) FROM $wpdb->posts, $wpdb->postmeta, $wpdb->users, $wpdb->usermeta WHERE $wpdb->postmeta.post_id = $wpdb->posts.id AND $wpdb->usermeta.user_id = $wpdb->users.id AND $wpdb->postmeta.meta_key = 'wpfp_favorites' AND $wpdb->usermeta.meta_key = 'wpfp_favorites' AND $wpdb->users.id = '".$curauth->ID."'"); while($array_meta = mysql_fetch_array($meta_query)) { $meta = explode('"',$array_meta['meta_value']); } class IndexFilter extends FilterIterator { public function __construct (array $data) { parent::__construct(new ArrayIterator($data)); } public function accept () { return ($this->key() % 2); } } $arr_meta = $meta; $posts_id = array(); foreach (new IndexFilter($arr_meta) as $key => $value) { $posts_id[$key] = $value; } ?> <h2>Favorite Posts</h2> <ul> <?php $data_posts_id = array_reverse($posts_id); foreach($data_posts_id as $show_posts_id){ echo '<li><a href="'.get_permalink($show_posts_id).'" title="Permanent link to '.get_the_title($show_posts_id).'">'.get_the_title($show_posts_id).'</a></li>'; } ?>
good luck ??
Viewing 3 replies - 1 through 3 (of 3 total)