admin管理员组

文章数量:1390531

So I use to have this site on a small time bulk hosting company and when I asked them why the code wasn't working they said it isn't supported on our server. I moved to a new hosting a few months ago though the problem has persisted, it's like something is blocking it that was put on from the old hosting?

function wpa_alter_cat_links( $termlink, $term, $taxonomy ){
if( 'category' != $taxonomy ) return $termlink;

return str_replace( '/category', '', $termlink );
}
add_filter( 'term_link', 'wpa_alter_cat_links', 10, 3 );
//* Activate shortcode function in Post Title
add_filter( 'the_title', 'do_shortcode' );
//* Shortcode to display the current year in WordPress
//* shortcode: [year]
add_shortcode( 'year' , 'current_year' );
   function current_year() {
   $year = date("Y");
   return "$year";
}

It works fine on my other site but not this one, which makes me think something is blocking it? The purpose of it, since it was copied was to basically do custom category pages as opposed to the standard Wordpress category pages, though the year short code does work.

本文标签: categoriesCustom FunctionPHP Code Not Working on One Site