• Resolved ide79

    (@ide79)


    I am using my own template with a custom page. The custom page displays data from an other database by variables. I use add_rewrite_rule and add_rewrite_tag (functions.php) to make the variables look nice in the urls when displaying the custom page. When I activate this plugin the NICE urls don’t work (404) in the custom page. Does this plugin affect to the add_rewrite rule?

    Btw, this is a nice plugin.

    https://www.ads-software.com/extend/plugins/the-events-calendar/

Viewing 5 replies - 1 through 5 (of 5 total)
  • It sure does!

    We have actually added a patch to improve how the rewrite rules function for pretty permalinks as we had a few bugs in the current release. The patch will be out with the next release, which I am hoping to do some time this week.

    If you are in a hurry – you can use the hotfix from here: https://www.ads-software.com/support/topic/354580?replies=13

    Thread Starter ide79

    (@ide79)

    Ok. It did not work for me, but i tested something in the-events-calendar.php i removed the add_action( 'init' array ( $this, 'flushRewriterules')); about line 320 and now it works.

    Interesting.

    Thread Starter ide79

    (@ide79)

    It would be nice to know how to get add_rewrite_rule to work when this plugin is active.

    rewrite rules works nicely in the posts and the event, but when using functions.php and a custom page template it does not work (404).

    if i remove the (flushRewriterules)in the-events-calendar.php it works.

    is there anyway to use add_rewrite_rule when this plugin is active? or does the flushRewriterules override my own rewriterule in functions.php and custom page tempalte.

    I dont think that removing the flushRewriterules line in the-events-calendar.php is the right way to proceed.

    I was chatting with kelsey and we agree that we don’t really need to flush the rewrite rules every time the plugin loads, as it seems to have consequences on other people’s plugins which might not expect this to happen.

    It’s hard to say how to get your add_rewrite_rule() call to work without seeing the context of your code. We can probably just get away with doing a rewrite flush when the plugin is activated. We’ll change how it works for the 1.6 release.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: The Events Calendar] Seems to affect add_rewrite_rule’ is closed to new replies.