Unit9
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Why is wp_dropdown_categories adding two select dropdowns?Hi guys,
I’ve come to the conclusion that
wp_dropdown_categories()
Is echoing to the front end of the site without me telling it to. And then echoing out again with the preg_replace onchange=’return this.form.submit()’ code included.
Is there any way I can prevent wp_dropdown_categories() from echoing to the front-end in the first instance?
Thanks! ??
Forum: Plugins
In reply to: [Achievements for WordPress] Award for logging in x timesThanks Jonioscm! ??
I have a really stupid question and I’m a noob, but, what does ‘your_textdomain’ mean in the actions?
$this->actions = array( 'logins_event' => __( 'The user logs into your site', 'your_textdomain' ), );
Should it be $login_count from my previous post? Or should the ‘logins_event’ be ‘$login_count’ from my previous post?
Thanks – as I said – I’m a noob!
Forum: Plugins
In reply to: [Achievements for WordPress] Award for logging in x timesAwesome jonioscm! ??
How do we make that activate an achievement though? ??
Forum: Plugins
In reply to: [Achievements for WordPress] Award for logging in x timesHi Jonioscm & Apokh,
I wasn’t sure about redirecting users after login as it breaks standard usability functionality: A person should be returned to the page before they logged in (unless they login through the login page I suppose! ?? ).
So this will help you store the login count of individual users without it redirecting anywhere.
function my_user_login_count($username, $user) { $login_count = intval(get_user_meta($user->ID, 'my_user_count', true)); $login_count++; update_user_meta($user->ID, 'my_user_count', $login_count); // Activate Achievements event according $login_count } add_action('wp_login', 'my_user_login_count', 10, 2);
I have no idea how to add the achievement event but this is a start. You can still add the login redirect if you like but this is purely to store the user login count.
Perhaps Paul could tell us how to add this as an achievement event? ??
Forum: Plugins
In reply to: [Achievements for WordPress] Award for logging in x timesThis sounds great! Would love to see the complete code as well! ??
Thanks so much for your reply Paul. ??
Your achievement is so awesome I don’t want to start creating my own! I was just wondering if there was any way I could teak some code to activate an achievement in your plugin when someone accesses a page.
But thanks for your reply and have a great weekend! ??
Forum: Plugins
In reply to: [Achievements for WordPress] A new user activates… achievementHi Paul,
I hope you’re well! ??
I just wanted to register my interest in a fix for this as well.
I’ve got a couple of achievements in place for this, like ‘Founding Member’ but obviously right now no one can unlock them while this feature isn’t working.
Would love to see this working again! ??
Forum: Plugins
In reply to: [Achievements for WordPress] Overriding Achievements CSS in WordPress Theme?FYI I managed to do this with:
add_action( 'wp_print_styles', 'deregister_my_styles', 15 ); function deregister_my_styles() { wp_dequeue_style('dpa-default-achievements'); wp_deregister_style('dpa-default-achievements'); }
And hard-coded my own achievements.css into the header. ??
Thanks again for the incredible work Paul! ??
Forum: Fixing WordPress
In reply to: All Categories Disappeared!?Hi again Esmi. ??
I’ve just turned on WordPress debugging:
This is the error I get:
WordPress database error: [Got error 28 from storage engine]
SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN (‘category’, ‘post_tag’, ‘post_format’) AND tr.object_id IN (501, 506, 522, 525, 527, 529, 533, 535, 537, 539, 541, 547) ORDER BY t.name ASCI’ve tried also repairing the databases in phpMyAdmin but no luck.
Forum: Fixing WordPress
In reply to: All Categories Disappeared!?Hi Esmi,
Thanks for your reply! I appreciate you taking the time to respond. ??
So yeah, I got in touch with Media Temple and they say nothing has changed on the servers. The thing is though I have 8 installations of WordPress on this server and it’s happened to every single one of them.
I’ve logged into phpMyAdmin and checked the ‘Terms’ databases (taxonomy and term relationships as well) and they all seem fine.
Not sure what to do as Media Temple are asking for $79 to restore the databases. ??
Any suggestions would be gratefully received! ??
Forum: Plugins
In reply to: [Achievements for WordPress] How-To: Create a LeaderboardHi Paul, Mike (& members!), ??
I found this code to display the member’s latest achievement in their profile: <?php echo get_the_post_thumbnail( dpa_get_user_last_unlocked( bp_displayed_user_id()), ‘thumbnail’); ?>
But is it possible to display the latest achievement for each member in the leaderboard?
Forum: Plugins
In reply to: [Achievements for WordPress] How-To: Create a LeaderboardNVM found it in the function! ??
Forum: Plugins
In reply to: [Achievements for WordPress] How-To: Create a LeaderboardHi guys,
This works perfectly for me, thanks Mike!
One thing though – using the shortcode feature ‘bbpress_profile_link’ links to https://mydomain.com/forums/users/<userid>
Whereas my members are at https://mydomain.com/members/<userid>
So what’s the shortcode to get that URL? ??
Forum: Fixing WordPress
In reply to: Separate News & Blog sections?Thanks again Esmi! ??
So I could choose to show the News section only on the homepage?
Forum: Fixing WordPress
In reply to: Separate News & Blog sections?Thanks Esmi!
So if I use sub-categories, I can make the blog only display the posts within the parent category ‘Blog’ and the news only display posts within the parent category ‘News’?