New answers tagged

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)) ...
iqbal Hossain's user avatar
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(...
cjbj's user avatar
  • 14.1k
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 ...
CoderBlue's user avatar
  • 101
0 votes

changed permalink structure and now ajax functions are broken

Have you already tried to flush permalinks? See Then I would start debugging the value of snek_results....
alula's user avatar
  • 11
1 vote

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-...
Sally CJ's user avatar
  • 37.3k
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 ...
Antti Koskinen's user avatar
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 ...
crdunst's user avatar
  • 121
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 ...
sotirov's user avatar
  • 129
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 ...
Merlin Industrial's user avatar
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(...
robertparkerx's user avatar

Top 50 recent answers are included