AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] wpForo and Pods conflict

5 Posts
2 Users
1 Reactions
2,726 Views
antonM
Posts: 131
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@antonm)
Estimable Member
Joined: 9 years ago
[#4048]

Hi guys!

I have a problem. I use Pods for create a custom post type (CPT) and after activating in Pods rewrite setting for my CPT I found that it not works. I found in file wpf-hooks.php call of function flush_rewrite_rules(). I guess that it flush Pods rewrite rules and my CPT not works. Is it possible to disable this function wpforo_do_rewrite()?


4 Replies
antonM
Posts: 131
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@antonm)
Estimable Member
Joined: 9 years ago
  • Flushing the rewrite rules is an expensive operation, there are tutorials and examples that suggest executing it on the 'init' hook. This is bad practice. It should be executed either on the 'shutdown' hook, or on plugin/theme (de)activation.
  • Flush rules only on activation or deactivation, or when you know that the rewrite rules need to be changed. Don't do it on any hook that will triggered on a routine basis. More detail information in the comments on WP Engineer's post: Custom Post Type and Permalink
add_action('init', 'wpforo_do_rewrite');

Is it really needed at any init?

https://codex.wordpress.org/Function_Reference/flush_rewrite_rules


Robert
Posts: 10746
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Ok, thank you for letting us know, we'll take a look on this issue.


antonM
Posts: 131
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@antonm)
Estimable Member
Joined: 9 years ago

Dear Robert,

is there any information about resolve this problem?


Robert
Posts: 10746
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

We'll try to add this change in next release. It's cumming very soon.


Share: