WordPress pagination error when using ACF CPT rewrite slug & Polylang CPT slug translation
WordPress pagination error when using ACF CPT rewrite slug & Polylang CPT slug translation
WordPress pagination error when using ACF CPT rewrite slug & Polylang CPT slug translation
Resolved! So I’ve added rewrite rule: add_rewrite_rule( ‘^[^\/]*\/review\/([^\/]*)$’, ‘index.php?review=$matches[1]’, ‘top’ ); And additional code to create appropriate url structure: function rev_update_slug( $post_link, $post, $leavename ) { if ( ‘review’ != $post->post_type || ‘publish’ != $post->post_status ) { return $post_link; } //** Field where related page post object stored in ACF field **// $pageid= get_field(‘related_home_inner_page’,$post->ID); $post_link … Read more
How to Dynamically Change the author_base URL Slug by Language in WordPress?
First add the rewrite rule: function wpse426504_add_rewrite() { add_rewrite_rule( ‘mycontent/events/([a-z0-9-]+)[/]?$’, ‘index.php?eventslug=$matches[1]’, ‘top’ ); } add_action( ‘init’, ‘wpse426504_add_rewrite’ ); function wpse426504_add_query_var( $query_vars ) { $query_vars[] = ‘eventslug’; return $query_vars; } ); add_filter( ‘query_vars’, ‘wpse426504_add_query_var’ ); That’s the basics of it. If you need to add a new template to handle displaying everything, you’d then hook to … Read more
make_clickable and parenthesis breaks the URL
Lots of people dealing with the same issue and I haven’t found a solution yet either. It’s like the whole thing is broken and most people just don’t care?
Have you considered to create a symlink from your document root (wordpress) directory to the directories in upper levels? You’ll need to uncheck the “Restrict the ability to follow symbolic links” checkbox in Plesk Hosting & DNS > Apache & Nginx Settings for that to work.
You can set your custom post type to support parents and children by setting the hierarchical argument on register_post_type() to true. If you’re wanting to have posts from your CPT be children of posts of the page post type, that is not possible, at least not without introducing instability.
I found a solution…thanks to a friend (DM you know who you are!) !!! The solution is to replace the last line with: RewriteRule ^/?$ /it/index.php [L]
CPT Rewrite Slug to Another CPT Slug/Key (as CPT-A/CPT-B Format)