Custom query URL 404 on server
-
Hello,
I created a function that show all tag from a post, when you click on the tag a url redirect you to an archive page with all post with the same tag. It work perfectly on localhost but when I send it on my web server (Plesk) it didn’t work at all and I’m redirected to my custom 404 page.
this is the function who “generate” the url :
function IPSL_search_tag($tag_slug=null){ global $IPSL; $PTYPE=array(); $ptype_list=$IPSL->PODS_LIST; $ptype_list[]='post'; $ptype_list[]='page'; $PTYPE='&post_type[]='.implode('&post_type[]=',$ptype_list); $template = get_template_part('find', 'tags'); $q=site_url()."?posts_per_page=-1&nopaging=true&tag[]=$tag_slug&post_status=publish&orderby=post_date&order=desc"; return $q ; } add_shortcode("IPSL_search_tag", "IPSL_search_tag");And this is the function who show the tag :
function sc_PODTags($atts){ global $wpdb; //error_log(var_export("PODS TAG is charged ipsl_shortcode l343", true)); $args=shortcode_atts(array( 'titre'=>'Tags cloud', 'hide'=>0, ),$atts); extract($args); $id=get_the_ID(); $tags=get_the_tags($id); if(empty($tags))return''; if($args['hide'])return; $ar=array(); $html[]='<div class="tagcloud"> <h2 class="widget-title">'.$titre.'</h2>'; foreach($tags as $tag){ $href=IPSL_search_tag($tag->slug); $txt=esc_html( $tag->name ); $html[]='<a class="tag-cloud-link" href="'.$href.'">'.$txt.'</a>'; } $html[]='</div>'; return implode('',$html); } add_shortcode('PODTags', 'sc_PODTags');The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Custom query URL 404 on server’ is closed to new replies.