Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages
Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages
Help Needed: Issue with Change Permalink on DirectoryPress Listing Pages
After moving content to a new site, gallery thumbnails are not pointing to media files
WordPress Version 6.6 facing “This block has encountered an error and cannot be previewed.” which edit text on page with link
We can type ctrl+k in the editor to activate the link search: that will search in all public post types. We can also type [[ in the editor to get the link inserter for latest posts.
So the problem was in the custom rest route which had the call to flush_rewrite_rules() which (as far as I can see) resetted the permalinks to default somehow and messed up the permalink structure. Once we removed all the calls to the custom route no 404 happened.
@wordpress/env cli doesn’t seem to properly update permalink structure until visiting the WP Admin Permalink settings page
You can use the post_link filter to do this. Example: function modify_post_link( $url, $post, $leavename=false ) { if ( $post->post_type == ‘post’ ) { $url = str_replace(home_url(), ‘https://preview.domain.com’, $url); } return $url; } add_filter( ‘post_link’, ‘modify_post_link’, 10, 3 ); In fact, with this you don’t even need your previous filter for get_sample_permalink.
WordPress is expecting http, but you’re visiting with https which is causing the mixed content error. Setting your site and address URLs to use https should solve your problem. If you can’t use https in the admin, then you’ll need to try ways to tell WordPress to use https only on the frontend. Try something … Read more
Instead of hard-coding the pages, categories and sidebars in your template file(s) you could consider registering a custom metabox to store the category relation (i.e. the category term ID) in the page post meta. This way you could make the sidebar handling dynamic. The first step would be to register, render and handle the saving … Read more
You need to add a new tag (e.g. %tag%) that you can use in post links. One possibility is to use the add_rewrite_tag() function. Then use the post_link filter to replace the %tag% in the link with the appropriate value. Finally, change the post link structure in the settings. Settings -> Permalinks -> Custom Structure: … Read more