916VT
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarSure.
Here is the code :
add_filter( 'avatar_defaults', 'newgravatar' ); function newgravatar ($avatar_defaults) { $myavatar = get_bloginfo('template_directory') . '/img/avatar.png'; $avatar_defaults[$myavatar] = "Own"; return $avatar_defaults; }And the url for anonymous comment :
<img height="80" width="80" class="avatar avatar-80 photo avatar-default" src="http://0.gravatar.com/avatar/?d=http://localhost:8888/mysite/wp-content/themes/rttw_v2/img/avatar.png&s=80" alt="">Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarI made one, but the url is still broken.
The error looks the same, with the gravatar url still showing up somehow.Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarOk, so I have tried without plugins on a local and live intalls but both did not work.
I still got the new avatar name displayed on admin page “Discussion” and I can select it but the image link is still wrong.
Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarI have tried at the top and at bottom on function.php of my custom theme and Twenty Fifteen.
I will try to turn off all plugins and I let you know.
Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarDo you know where may I check for the overwriting ? Right now, I just call
<?php echo get_avatar( $comment, 80 ); ?>On my functions.php file to get a custom template based on wp_list_comments().
Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarSo, I tried on Twenty Fifteen but it did not work neither.
Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarActually, the return url is not exactly the same…
http://1.gravatar.com/avatar/1d2ab164559aaf8a30eebf516d2f63ad?s=80&d=http%3A%2F%2F((mysite))%2Fwp-content%2Fthemes%2Frttw_v2%2Fimg%2Favatar.jpg%3Fs%3D80&r=G
Forum: Fixing WordPress
In reply to: Issue for changing Mystery Man avatarHi Konstantion,
Unfortunately, the issue stays exactly the same…Forum: Fixing WordPress
In reply to: Looking for acting on parent categories onlyHello Daniel,
It looks to work just perfectly ! Awesome !
I was reading Google result pages for hours… :’)
Thanks a lot for your help, really appreciated
VincForum: Fixing WordPress
In reply to: Languages get mixed on wp_query [ Polylang ]I did not. Just looked for another way to display my posts.
Forum: Fixing WordPress
In reply to: Display 2 posts from wp_query with an exclude category?'cat' => '-78,-79' ,Now it seems to work just fine 🙂
Forum: Fixing WordPress
In reply to: Display 2 posts from wp_query with an exclude category?I keep looking from your $mylang idea, and I got that :
$language = get_locale(); if ($language == 'fr_FR') { $mylang = fr ; } else { $mylang = en ;} $args = array( 'cat' => -78,-79 , 'lang' => $mylang, 'posts_per_page' => 2 , 'orderby' => 'rand' ); $the_query = new WP_Query( $args );It avoids the mix of languages, which is cool.
But for some reasons, it still doesn’t care about the ‘cat’ => -78,-79 , even here when I write directly the categories ids…
Forum: Fixing WordPress
In reply to: Display 2 posts from wp_query with an exclude category?Very nice from you 🙂
For information, I also tried to add manually the category IDs and it still breaks Polylang posts split
$args = array( 'cat' => -78,-79 , 'posts_per_page' => 2 , 'orderby' => 'rand' );Forum: Fixing WordPress
In reply to: Display 2 posts from wp_query with an exclude category?Hum nope, it did not work… =(
I made some tries to get the current langage from another way, but same result.
Forum: Fixing WordPress
In reply to: Display 2 posts from wp_query with an exclude category?Thanks Adam for your feedback !
Yeah, but all my tries with the second code (‘cat’ => -$post_cat) killed Polylang someway… I’m pushing the first option on my side.
Thanks again for helping 🙂