antoniorigo
Forum Replies Created
-
Forum: Plugins
In reply to: [Join My Multisite] Hardcode [join-this-site] button/functionalityThanks, you’ve been a great help.
I finally managed to make this work with WordPress Social Login and some custom code based on your plugin:
if (isset($_POST['subscribe'])) { $blog_id = get_current_blog_id(); $user_ID = get_current_user_id(); $role = 'subscriber'; add_user_to_blog($blog_id, $user_ID, $role); }<form action="?subscribe" method="post"> <input type="hidden" name="action" value="subscribe"> <input type="submit" value="Subscribe" name="subscribe" id="subscribe" class="button"> </form>Couldn’t have done it without you!
Forum: Plugins
In reply to: [Join My Multisite] Hardcode [join-this-site] button/functionalityThe plugin is activated, and works just fine with the shortcode con a blog post.
it doesn’t work on a custom_post harcoded.
Forum: Plugins
In reply to: [Join My Multisite] Hardcode [join-this-site] button/functionalityThanks Mika for this awesome plugin. Very useful functionality!
Didn’t know about that function, it will come handy, i’m sure.
The thing is I’d like to expand your button/shortcode functionality, I want to make a single button that does:
1) If visitor is not registered on the multisite, button shows “Subscribe” text. on click, show modal so the visitor can sign up with facebook, then automatically sign in and add as suscriber of current site. Button text changes to “Subscribed”.
2) If the visitor is registered on the multisite, but not registered to the current site, button shows “Subscribe” text. on click, user is added as subscriber of the current site. Button text changes to “Subscribed”.
I have the first use case working as described.
Now I’m trying to get the second use case going, and I might need to tweak your code so it would work as i need it to.
So far i’ve tried using the form the shortcode outputs with no success:
<form action="?jmm-join-site" method="post" id="notmember"> <input name="action" value="jmm-join-site" type="hidden"> <input value="Join This Site" name="join-site" id="join-site" class="button" type="submit"> </form>Am I missing something?
Thanks again,
AForum: Plugins
In reply to: [WP-PostViews] Count views for POST in home page.Thanks Lester!
Since I’m using WP_CACHE true I ended up modifing that function instead.
Tweaked the conditonal in L141 so it wouldn’t skip the home page and added a conditional for L160 that fetches the latest custom-post’s id and adds that to the array.
All working as wanted 🙂
Forum: Plugins
In reply to: [WP-PostViews] Count views for POST in home page.You are correct, It’s a post dispayed in the home page, what I want to know is where in your code could I start looking to make the post counter increment when it’s being viewed on the home page.
I’m not asking for a solution, just wanted some guidance as to where could I start looking/tweaking to get this functionality going.
Forum: Plugins
In reply to: [WP-PostViews] Count views for POST in home page.I understand that, the thing is, I’m displaying the latest (1) post in the home page. and the count is not incrementing.
Just point me in the right direction so I can solve it. Thanks!