Attachment page gives 404 if user not logged
Attachment page gives 404 if user not logged
Attachment page gives 404 if user not logged
I can’t gibe a full answer but at least I’ll try to give some pointers: You’ll first have to grab the parameter from the URL, pass it to WP and then add the parameter to your links. I’m not aware of any plugin that would do all the three steps out of the box – but … Read more
URLs with two taxonomies are missing from sitemap
Rewrite tags aren’t used in the context of add_rewrite_rule. If you were to use your tag in the post permalink settings under Settings > Permalinks, then your tag would be present in the link passed to the post_link filter. I think you need to add a new permalink structure containing the tag directly to the … Read more
WordPress search rewriting
Why does my URL rewriting only work using two different methods?
Well, I explain here what I finally did to sort this out. I haven’t found a proper way to do so but: I created a rewrite function that retrieves all parameters and generates a final URL with the parameters ordered in a specific way. function sc_change_programs_search_url_rewrite() { if(get_query_var( ‘post_type’ ) == ‘program’) { if(isset($_GET[‘word_search’]) || … Read more
The first rule is capturing all requests. If you add a $ anchor at the end of the rules, they’ll behave as expected (you could also just switch the order of the rules so the more specific one “wins”). add_rewrite_rule( ‘^app/course/([^/]+)/?$’, ‘index.php?page_id=3400&course=matches[1]’, ‘top’ ); add_rewrite_rule( ‘^app/course/([^/]+)/theme/([^/]+)/?$’, ‘index.php?page_id=3400&course=$matches[1]&theme=$matches[2]’, ‘top’ ); Check out Monkeyman Rewrite Analyzer for … Read more
I think this should work if library functions are used everywhere. function custom_term_archive_link($url, $term, $taxonomy) { if($taxonomy != ‘product_cat’) { return $url;} if( $term->name == ‘my_term’ ) { $url=”my_term_static_url”; } return $url; } add_filter(‘term_link’, ‘custom_term_archive_link’, 99, 3);
The link you provided deals with restricted access based on user permissions. But I gather from your question that you want to block hotlinking as a whole. If you don’t already have one, you should create a .htaccess file in your root WordPress directory (same location as wp-config.php). Add the following to it: # WP … Read more