slideaway
Forum Replies Created
-
Forum: Hacks
In reply to: Custom RSS feed and codex code issueTurns out there must have been some caching issue and that didn’t actually fix my issue. Back to the original question I guess. It seems that get_query_var( ‘post_type’ ) == ‘event’ is what is failing in this, but I haven’t been able to figure out an alternative that will hit just the event pages.
Forum: Hacks
In reply to: Custom RSS feed and codex code issuefunction lw_events_rss2( $for_comments ) { $rss_template = get_template_directory() . '/events-rss2.php'; if( get_post_type( $post->ID ) == 'event' and file_exists( $rss_template ) ) load_template( $rss_template ); else do_feed_rss2( $for_comments ); // Call default function }I had to change the if to get_post_type and it seems to work now. I’m curious if anyone else can get the codex code to work for them, or if that example might be messed up and should be changed.
Marcus: I’m really close on this, but can’t seem to get the template to apply using a function. I was able to get debsch’s code working in the core feed-rss2.php file, but can’t seem to get it working as a function now.
remove_all_actions( 'do_feed_rss2' ); add_action( 'do_feed_rss2', 'lw_events_rss2', 10, 1 ); function lw_events_rss2( $for_comments ) { $rss_template = get_template_directory() . '/events-rss2.php'; if( get_query_var( 'post_type' ) == 'event' and file_exists( $rss_template ) ) load_template( $rss_template ); else do_feed_rss2( $for_comments ); // Call default function }I discovered if I swap the load_template( $rss_template ); line into the else statement it does work, but inherently screws up the rest of the RSS2 feeds on the site. I grabbed and adapted this snippet from http://codex.wordpress.org/Customizing_Feeds but I can’t seem to figure out what might be going wrong.
I’m looking at this problem again and believe I have found a discrepancy in the feeds.
When I look at a category RSS feed like this link it loads the default RSS 2.0 template from wordpress.
http://demo.wp-events-plugin.com/events/categories/easy-listening/feed/If I go to this URL it will use the EM RSS template.
http://demo.wp-events-plugin.com/events/feed/I was tricked by this as they do look very similar but it is actually doing what I initially started this thread about. The EM RSS template isn’t applying to the category pages, but just returning a simplified version of the Events listing into the default RSS template. If you look at the source code of those 2 pages I linked you will see they are using different templates.
I applied the fix that Agelonwl mentioned, but all that achieved was that both the events page and category pages would use the default WP template, and not the EM template.
So I ask, is there a possible solution to this problem? This has been a huge issue for me as I need to use those RSS feeds on an external site, but since I can’t get the category pages to display the proper event data in the RSS feed it is quite problematic.
Ideally I want the category RSS to pull from the EM RSS feed, so I can pull in all the date/time/location/description all into one formatted feed.
Marcus: Could you clarify about wp archiving? I have archives for my site, as I understand it they’re on by default in a regular WordPress install. Is there something else that should be enabled?
Looking at the demo site it definitely works the way I want it to, so now I need to figure out why it isn’t working on my site. I just tried turning off all my plugins except events manager and still had the same issue, so I can’t quite figure what might be going wrong. The one thing out of the usual with my site is that it is an IIS install of WordPress. I don’t figure it would make a huge difference, but maybe there’s something causing this function not to work properly. I’m going to give it a go on one of my apache based sites and see if that might be an issue.
Thanks for the reply Marcus. Where is this demo site that you mentioned? I googled and found a couple different threads with sites using the plugin, but not a specific demo site that I noticed on the official plugin site.
In looking at a few sites that use the plugin I did see one that seemed to be doing what I wanted.
http://tompkinsfireems.org/events/feed
http://tompkinsfireems.org/events/categories/meetings/feedThey both seemingly use the same template to display the info. I’m not sure if this is actually using the EM RSS layout, or whether it might just be pulling an excerpt with the same info.
I’m having this issue on 2 different installs of EM, so I’m not sure if maybe there is some setting I’m missing or what I need to do to get this working.
I’m going to drudge this topic up again as I’ve spent the last day fighting to try and get this functioning without any luck.
Is there any plan to make it so the RSS template that works on the events page so that it is applied to the sub pages and specifically the category pages. I’m importing this data via RSS into another site and that is rendered somewhat useless when it doesn’t pull in the date and time of the event in question via the standard RSS feed format.
Now I tried something like this in the em-rss.php file
‘if ( !empty($_REQUEST[‘dbem_rss’]) || (is_object($post) && $post->ID == get_option(‘dbem_events_page’) && $wp_query->get(‘rss’)) || (is_object($post) && $post->ID == get_option(‘dbem_categories_page’) && $wp_query->get(‘rss’)) ) { ‘
as well as this in the events-manager.php file
‘if ( is_object($post) && $post->ID == get_option(‘dbem_events_page’) && $wp_query->get(‘rss’) || is_object($post) && $post->ID == get_option(‘dbem_categories_page’) && $wp_query->get(‘rss’) ) {‘
And neither achieved what I was looking to do and given my limited PHP experience I’m just kinda grasping at straws here. Can anyone offer some insight here?
I know this is an old thread, but I wanted to drudge it back up. I’m not sure if my problem is exactly the same, but it does sound similar. When I submit the form in the options panel it sends to a malformed URL and fails to save anything.
I ended up looking in the plugin found a solution to this problem. I changed line 96 of wpnivoslider4wp-options.php to use siteurl instead of wpurl.
Original
<form name="nivoslider4wp_options" method="post" action="<?php bloginfo('wpurl') ?>/wp-admin/admin.php?page=nivoslider4wp-options">Changed
<form name="nivoslider4wp_options" method="post" action="<?php site_url() ?>/wp-admin/admin.php?page=nivoslider4wp-options">After making that changed it worked just fine for me.
I just ended up finding a post that you mentioned deleting wp_em and wp_dbem from the data. So that ended up working. Thanks for the Adminer suggestion, that looks pretty awesome.
Forum: Hacks
In reply to: RSS Feed URL parameters – get last 7 days of posts?I’m also looking for some type of solution that does this.
Forum: Plugins
In reply to: Custom Post Type UI – Categories not working properly with Custom Post TypesI just last weekend actually figured this one out. It turned out to be a plugin conflict. I was using a tag and category excluder plugin to hide stuff I didn’t want to show and it was conflicting with the custom post types. Hope that helps.
Forum: Fixing WordPress
In reply to: Adding First and Last classes to menu itemsI’m not asking here about pseudo classes here. Pseudo classes are precisely why this is required, because they can’t be relied on in 100% of browser situations.
Forum: Plugins
In reply to: Custom Post Type UI – Categories not working properly with Custom Post TypesAnyone on this one?
Forum: Plugins
In reply to: Delete Duplicate Posts plugin is stuckI’m having the same issue. The plugin page only loads an ad and nothing else.
Forum: Plugins
In reply to: [Plugin: Thumbnail For Excerpts] Thumbnail showing up after excerptNevermind, turns out I had multiple excerpt plugins active at the same time, so that was what the issue was.