If we can not assign any post to particular category then link is not generated, and redirect to homepage particular language.
https://uatstaging.aljada.com/en/property_category/sarab-community/
Please check screenshot :
https://prnt.sc/gILyTuT3UMGe
https://prnt.sc/MNvzM80rcE6W
all are working fine but only this issue.
Please fix ASAP.
Thanks
Kishan Kothari
campaign
and a custom post type called asset
. For assets, I want to have the following permalink structure: mysite.com/<campaign_name>/<asset_name>
. I have achieved this by the following code, but now if I go to any normal page with the url structure mysite.com/<pagename>
it gives a 404. And when I comment out the rewrite slug part in the function for registering the custom post type, or add this instead ams/%campaign%
, it works but that’s not the URL structure I want for my custom post type.
Code for registering custom taxonomy:
...
'rewrite' => array(
'slug' => '',
'with_front' => true,
),
...
Code for registering custom post type:
...
rewrite' => array(
'slug' => '%campaign%',
'with_front' => true,
),
...
Functions for rewrite rules:
function ams_asset_add_rewrite_rules( $rules ) {
global $post;
if ($post->post_type == 'asset' ) {
$new = array();
$new['([^/]+)/(.+)/?$'] = 'index.php?asset=$matches[2]';
$new['(.+)/?$'] = 'index.php?campaign=$matches[1]';
return array_merge( $new, $rules );
}
return $rules;
}
add_filter( 'rewrite_rules_array', 'ams_asset_add_rewrite_rules' );
// Handle the '%campaign%' URL placeholder
function ams_asset_filter_post_type_link( $link, $post = 0 ) {
if ( $post->post_type == 'asset' ) {
$cats = wp_get_object_terms( $post->ID, 'campaign' );
if ( $cats ) {
$link = str_replace( '%campaign%', $cats[0]->slug, $link );
}
}
return $link;
}
add_filter( 'post_type_link', 'ams_asset_filter_post_type_link', 10, 2 );
]]>here is my website search box
https://www.ads-software.com/plugins/search-autocomplete/
]]>https://www.ads-software.com/plugins/search-filter/
]]>plz help
From
India
https://www.ads-software.com/plugins/search-filter/
]]>– The top 2 items (drenthe) are double and needs too be 1 i couldn’t find out why gravity form duplicates te top item. (See image link for more info)
– the child items of my taxonomy have — in front of them and i also dont know how i could remove this. (See image link for more info)
i’ve searched for answers all over google but couldn’t find a solution to my problems.
Thanks in advance.
IMAGE :
https://i.imgur.com/VPfVQqT.jpg?1
https://www.ads-software.com/plugins/gravity-forms-addons/
]]>creating a sort order for category posts based on custom texonomy term.
like
Show posts from Category 1 which has custom texonomy term ‘a’
Show posts from Category 1 which has custom texonomy term ‘b’
searching for this since last 2 days but didn’t succeed.
need help
]]>Title template : %%term_title%% – %%title%%
Result : – Movie Name