Ross Wintle
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: pre_get_posts meta_query nested array not workingI seem to be struggling with this too. Do you know if it was logged as a bug or anything? Seems to be no response!
Forum: Plugins
In reply to: [Theme My Login] After submitting a profile page I get the login formOK. I had to dive deep into the code to fix this.
It turns out that, when you first enable the plugin, it creates a load of special pages that have a special piece of data attached that identifies them as special (postmeta with the key _tml_action, if anyone’s wondering). This is also true of when you enable themed profiles – it creates a special page with this hidden piece of data.
I’ve found that using TML via a shortcode or function call simply doesn’t work unless you’re using it on the special page created at the start.
In the code there’s some things called ‘instances’, but they seem poorly documented and I can’t work out exactly what they’re supposed to do.
Has anyone worked out what instances are for and how they can be used?
I’ll set this to resolved because I have a fix that I’ve found, but I’d love to know more.
Nope – still broken in 2.9b4
I’ve emailed you through the form.
Thanks
I confess, I never got to look into it in depth. Changing settings may have worked but I didn’t have time to try it out.
Sure. Plugin is 404 Redirected.
Not something I installed, I should add!
Thanks for your help today Don!
Apologies. Resolved. There was another plugin that was doing some redirects.
Bet you get a lot of that.
Sorry. 🙁
Aaaaah. Hang on.
Thanks for the quick response.
They are set up like that. I have, for example:
Source:
/terms/Destination:
http://outsideclinic.co.uk/about-us/legal/557-2I’ve not got any redirects from www to non-www, but thanks for the tip!
See the settings in this screenshot.
Thanks again.
Oh, worth noting that these redirects are set up in the Redirect Options->Quick Redirects section, not on individual posts/pages.
Also, I had a look through the forums here. There was someone with a similar issue about 10 months ago that’s flagged as resolved, but there was no stated resolution that I could find.
Thanks for your help!
Yeah, I’ve got a simple workaround along these lines (see above), but I’m not convinced it’s the best way – it only passes the event category from the query args, not any other parameters.
I’d rather understand what’s going on and try to get it fixed if possible.
I’d have a look into the code but I don’t have time right now. Wondered if this was a known issue or something the developers could look into – especially as I can re-create it in Twenty Twelve.
OK, this is REALLY weird. I think I must have discovered a bug. I’ve managed to replicate the same issue with the Twenty Twelve theme. So it’s either a bug, or something weird in my EM settings.
If I create a taxonomy-event-categories.php and put, at the very top, before any other code:
if (have_posts()) { echo "Yes" }I don’t get yes echo’ed. So there are no posts in the query.
If I remove the taxonomy-event-categories.php file, then the event list for the category seems to use page.php. And if I edit page.php to add the debugging code (shown above) to the header, then I get the “Yes” echo’ed.
Why does the content of the query change if I have a taxonomy-event-categories.php file?!
I can replicate this with the Twenty Twelve theme. If I switch themes then, initially, it’s OK – my event archive for the category displays fine. But if I take a copy of page.php and call that copy taxonomy-event-categories.php, the event archive for the category becomes empty.
Can someone confirm if this can be replicated. Can someone from the plugin support team see if this is a bug that got introduced at some point? I think this used to work, so perhaps a recent update broke something?
Thanks.
OK. Looks like there IS a problem with the theme. But what? What does Events Manager hook into to print the event details?
Thanks Philip.
I understand the Template Hierarchy. And as far as I can tell it has a hyphen, not an underscore. See http://plugins.svn.wordpress.org/events-manager/tags/5.5.2/em-posts.php, line 5 for the definition of the name of the type.
I’ve created the correct template and confirmed that code that I put in that template is displayed when I view the archive for the term.
What I want to know is if this is the correct mechanism for doing what I’m trying to do, or is there a better way. And if it is, what do I need to put in that template to get the list of events correctly.
I’ve got it working with:
$cat = get_queried_object(); em_events(array('category' => $cat->term_id));But this isn’t ideal as it only passes the category to em_events. It doesn’t pass any other query args.
Still looking for a better way!
Ross
Argh! This code was broken by a recent update to the plugin (your major code refactoring, I think.
Made me realise that I was doing it wrong anyway because GA_Filter isn’t a static class!
Here’s corrected code:
`$url = get_post_meta( get_the_ID(), ‘_some_meta_var’, true );
$link = sprintf(‘%s, $url, “My download”);
global $yoast_ga;
if (is_a($yoast_ga, ‘GA_Filter’)) {
$link = $yoast_ga->the_content($link);
}Hey Marble23
Are you the guy I was chatting with in IRC yesterday? I actually use a combination of:
'has_archive' => 'new_slug'and
'rewrite' => array( 'slug' => 'new_slug' )That seems to work, but I’ve never had an explanation of why I need both!
Ross