Route to custom file
This is just simple. First create a page and use slug for it as custom. And then rename you php file to page-custom.php and that would be it.
This is just simple. First create a page and use slug for it as custom. And then rename you php file to page-custom.php and that would be it.
Finally found the problem. This theme flush the rewrite rules on every request. I have removed the multiple calls to flush_rewrite_rules() and the problem is now gone.
First, year is already a WordPress query var used for date-based archives, you should change that to something unique to prevent possible conflicts. To use your own query vars within rewrite rules, you need to add them to the list of known vars: function wpd_query_vars( $qvars ) { $qvars[] = ‘my_year’; $qvars[] = ‘make’; $qvars[] … Read more
Since it’s a standalone script, you can just link to it directly and WordPress will be none the wiser. Just make sure you get the link right – if it’s in your theme, it will be something like: http://example.com/wp-content/themes/my-theme/generate-pdf.php Don’t hardcode the URL though, use the available template functions: <a href=”https://wordpress.stackexchange.com/questions/199196/<?php bloginfo(“template_url’ ) ?>/generate-pdf.php”>Generate!</a> Of … Read more
Milo’s comment got me there: add_rewrite_rule( “^{$slug}/”, “index.php?location={$slug}”, //changed query var to location ‘top’ );
WordPress dynamic subpage for ACF
I don’t see why you can’t multisite. On the main site you’d just need to switch_to_blog(), get content from one of the group blogs, then restore_current_blog().
Add specific route for Custom Post Type (add/edit…)
You can disable the translate of your cpt in polylang and use translated pages to display your cpt posts. In your page template, detect if the current language is english and use your custom translation code to display those translated fields. I want an URL like : www.domainame.com/en/ You can set it up in the … Read more
Define a new sub-folder naming – Multisite