New answers tagged permalinks
0
votes
Add URL to selected post in meta box
$posts = get_posts(array('post_type'=> 'lesson', 'post_status'=> 'publish', 'suppress_filters' => false, 'posts_per_page'=>-1));
// Check if a lesson is selected
if (!empty($my_dropdown)) ...
0
votes
How to Display Content from Search URLs on Permanent URLs in WordPress?
My general approach would be to use the pre_get_posts action to intercept the search query and then to change that query to suit your needs. It would start like this:
function wpse418573_search_filter(...
0
votes
Category links suddenly started giving 404 errors
This happened to me after my host migrated to a different server. The answer for me as markratledge stated above was to "resave your permalinks from WordPress admin."
To expand on this in ...
0
votes
changed permalink structure and now ajax functions are broken
Have you already tried to flush permalinks? See https://www.wpbeginner.com/beginners-guide/how-to-regenerate-your-permalinks-in-wordpress/
Then I would start debugging the value of snek_results....
1
vote
Accepted
How to make 2 (or more) custom post type post pages sit under the same slug?
You were getting /video-demos-tours/post-name instead of /resources/post-name because the following line in your theme_build_post_args function is setting the rewrite slug to the post type slug (video-...
0
votes
How to Display Content from Search URLs on Permanent URLs in WordPress?
If you have registered a custom post type and have added a custom template for it to your theme, then you could do something like this.
Add a helper function to functions.php that creates a custom ...
0
votes
Combining Multiple Taxonomies in one URL
Old question, but after stumbling across this today and looking at possible solutions, there's a great plugin that seems to work brilliantly for multiple taxonomies. It's not my plugin, but worth a ...
0
votes
How to have a hierarchy of custom post types and use two of them in the permalink?
You can do this with custom hierarchical taxonomy and use it for your custom post type.
Register the Taxonomy area for the post type content using the init action hook:
function ...
0
votes
Permalinks keep reverting to 404 unless I re-save them
I have an Apache server, and it happens to our site as well. We have another site on the same server and this never loses the permalinks. It's getting so bad that I need to login and re-save the ...
0
votes
Duplicate Content Issue with WordPress Permalink Structure and Primary Categories
function get_current_post_ID() {
$postid = get_queried_object_id();
$post_url = get_permalink( $postid );
//wp_redirect( $post_url );
if( has_category('', $postid) && urldecode(...
Top 50 recent answers are included
Related Tags
permalinks × 3151custom-post-types × 656
url-rewriting × 474
custom-taxonomy × 286
rewrite-rules × 262
urls × 220
categories × 211
posts × 191
slug × 188
htaccess × 182
404-error × 176
redirect × 155
pages × 127
plugins × 116
php × 110
customization × 93
plugin-development × 81
links × 81
taxonomy × 62
pagination × 59
archives × 57
multisite × 53
functions × 52
templates × 50
woocommerce-offtopic × 46