Luke Etheridge
Forum Replies Created
-
Forum: Plugins
In reply to: [Advanced Custom Fields (ACFยฎ)] Getting 'page link' to return more than URL.Just to let you know guys that this has been solved and answered by Elliot (plugin author) via his own support site – http://support.advancedcustomfields.com
Please find Elliot’s solution here – http://support.advancedcustomfields.com/forums/topic/getting-page-link-to-return-more-than-url/
Forum: Plugins
In reply to: [WP-Members Membership Plugin] Wrapping each label and input combinedThis is what I’m trying to do – http://mockupr.com/mu/mlux1714/bf2-facilitator-login–register-page-design
Forum: Plugins
In reply to: [MAJpage Menu Class Extender] Odd class to odd li's within 'sub-menu' ul'sThanks man!!
Absolutely perfect bud, exactly what I wanted. And thanks for providing the edited walker function it’s much appreciated.
Luke
Forum: Plugins
In reply to: [WP-Members Membership Plugin] Redirect to refferer after loginHey Chad,
Sorry to be a pest but is there any way to do this (above)?
I appreciate any help with this bud.
Luke
Forum: Plugins
In reply to: [WP-Members Membership Plugin] Redirect to refferer after loginHey Chad,
One last question (at least I think so).
The site I’ve been developing with your plugin is here – http://www.sportscluboffers.co.uk
For this question if you could please go here and click on the ‘Login or Register’ button for one of the offers.
Now, I’ve made it so that as soon as the visitor ‘logs in’ with the login form, they redirect to the full page of the offer they were logging in for (redirected to the permalink). But what I want to know is how to do exactly this if the visitor successfully ‘registers’ (so is a non-member) using the registration form below it?
So only upon successful registration does it not only register but log them in and take them back to that offers full listing (permalink).
This sounds far fetched but like anything I’m sure it is possible in some way. Please let me know if this is achievable.
Thanks Chad,
LukeForum: Plugins
In reply to: [WP-Members Membership Plugin] Redirect to refferer after loginChad,
It does and that’s what I meant by ‘redirect’ I just used the wrong terminology ๐
All I know is that it was redirecting to the homepage after login no matter where the user logged in from on the site, and now it keeps them on the page they were viewing before signing in.
Thanks again for all your help Chad.
Luke
Forum: Plugins
In reply to: [WP-Members Membership Plugin] Redirect to refferer after loginAm I right in thinking you’ve fixed the widget to redirect to the current page in the latest update?
If so, thanks Chad you’re a legend!
Luke
Forum: Plugins
In reply to: [WP-Members Membership Plugin] Redirect to refferer after loginChad,
Yes I know about this issue, and I know there is PHP that can be used to simply get the current page’s URL. Something which is outside of the WordPress Codex like…
http://webcheatsheet.com/PHP/get_current_page_url.php
All I need to know is what I need to do to actually get the widget to direct to the current page on ‘submit’? Like is there something that I can put into functions.php that will specifically target the widget form and not all other WP Members forms?
I was using this before, but clearly this targets all WP Members forms…
add_filter( 'wpmem_login_redirect', 'my_login_redirect' ); function my_login_redirect() { // return the url that the login should redirect to return site_url(); }Forum: Plugins
In reply to: [WP-Members Membership Plugin] Redirect to refferer after loginChad,
Just thought I’d let you know that I’ve PHP coded in a solution to my template files which kind of fixes the directing to refferer after login. I just need to have the widget automatically direct to the current page after login. Any ideas?
Thanks,
LukeForum: Fixing WordPress
In reply to: List Custom Post Type Taxonomies WITH Image and DescriptionThanks lonchbox!!
I’ve actually ended up crafting a rather sophisticated custom walker along with a guy named Mark here – http://stackoverflow.com/q/18121433/1635736
I’ve actually achieved exactly what I was after which is cool ๐ And it can be customised and manipulated within the WP Menu’s options.
Hope this helps you anyway mate.
Hey Mediamojo13,
Thanks for the kind words!
Nah definitely no genius – not in PHP anyway ๐
All you have to do is insert the above code inside the loop of your template file and away you go. This will simply display the following…
1 > ‘Expires within 24hrs’ (wrapped in <b>)
2 > ‘1 Day Left’ (wrapped in <b>)
3 > ‘2 Days Left’ (wrapped in <b>)
4-7 > ‘% Days Left’
7 < ’24th October 2013′ (normal postexpirator display)I’ll give you a visual when it’s live but it may not be for a month or so.
Let me know if you have any problems.
Right, it appears I jumped the gun and I’m in fact my own support ๐
I’ve fixed all that I needed with the following…
<?php $expirationdatets = get_post_meta($post->ID, '_expiration-date', true); $postid = $wp_query->post->ID; $date=get_post_meta($post->ID, '_expiration-date', true); $diff=$date-time(); $days=floor($diff/(60*60*24)); ?>And…
<?php if ( $expirationdatets ) { ?> <span class="expire" title="Offer Expiry"> <?php if ($days == '-15931') { echo ""; } else if ($days == '0') { echo "<b>Expires within 24hrs</b>"; } else if ($days == '1') { echo "<b>$days Day Left</b>"; } else if ($days == '2') { echo "<b>$days Days Left</b>"; } else if ($days == '3' || $days == '4' || $days == '5' || $days == '6' || $days == '7') { echo "$days Days Left"; } else { echo do_shortcode('[postexpirator]'); } ?> </span> <?php } ?>Please let me know if there is a better/cleaner way to achieve exactly that of the above, as you can probably see my PHP is not at it’s best ๐
Thanks,
LukeOK so for the above ^ I’m doing…
<?php if ( $expirationdatets ) { ?><span class="expire"><?php echo do_shortcode('[postexpirator]'); ?></span><?php } ?>Let me know if there is a better way please?
The only question outstanding is how to display the expiration as ‘% Days Left’.
Thanks.
LukeAlsoooo…
This is my code…
<span class="expire"><?php echo do_shortcode('[postexpirator]'); ?></span>BUT, how do I have this only display when ‘Enable Post Expiration’ is checked for that specific post/post type?
—–
So if ‘Enable Post Expiration’ is checked display this…
<span class="expire"><?php echo do_shortcode('[postexpirator]'); ?></span>If unchecked display nothing.
I got how to add the short code with…
<?php echo do_shortcode('[postexpirator]'); ?>But now just need to know how to display as ‘Days Left’?
Thanks.
Luke