WordPress.org

Ready to get started?Download WordPress

Forums

WP RSS Multi Importer
[resolved] Different Templates for Different Categories? (8 posts)

  1. deewilcox
    Member
    Posted 1 year ago #

    Thanks for a fantastic plugin. I have successfully used this feed for two different categories. I have a custom template created for one category (as well as a custom page template in my theme, to parse the data), and I'd like to use the default template for the second category. Is that somehow possible?

    Here is the working feed: http://ravenwood.mobi/calendar

    And here is the wonky one: http://ravenwood.mobi/news

    Thanks for your help!

    http://wordpress.org/extend/plugins/wp-rss-multi-importer/

  2. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,
    Right now, the plugin doesn't support using more than 1 template (even though you can customize that template). But this is a good suggestion and I'll see if there is a way to make it so you can use more than one template.
    Allen

  3. deewilcox
    Member
    Posted 1 year ago #

    I was just looking at your code for template_functions.php. What if we added a category field for the DB record? And checked by that?

  4. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    yeah...that's possible..it's likely that it would need a shortcode parameter, however, so I'll need to think about that..unless you want to code it :)

  5. deewilcox
    Member
    Posted 1 year ago #

    You obviously know the plugin much better than I do, but I just might give it a shot. If it works, I'll let you know.

  6. Allen
    Member
    Plugin Author

    Posted 1 year ago #

    actually, the easiest way to do this is as follows:

    go into the main wp-rss-multi-importer.php file and add a shortcode parameter to overrwide the $template variable...then put in the shortcode using the new parameter (it would have to be the precise php file name) and that should work.

    If you want, email me at
    http://www.allenweiss.com/contact

    and I can send you a revised file that should do the trick without having to change the db

  7. deewilcox
    Member
    Posted 1 year ago #

    This line?
    $template=$options['template'];

  8. deewilcox
    Member
    Posted 1 year ago #

    Went with this. Works beautifully!

    if ($thisCat == 1){
    	$template=$options['template'];
    }
    else {
    	$template = 'default.php';
    }

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic