Tag Info

Hot answers tagged

1

Your should add rewrite endpoint template on theme activation hook and init hook. Also there is some little checks to perform to prevent errors. function sjc_theme_activate(){ sjc_theme_add_rewrite_endpoint(); flush_rewrite_rules(); } //for more info http://codex.wordpress.org/Plugin_API/Action_Reference/after_switch_theme add_action( ...


1

You can filter page_link to modify the output of any page's permalink value. The simplest way to identify the page is by ID, then you can append the query string via add_query_arg: function wpd_append_query_string( $url, $id ) { if( 42 == $id ) { $url = add_query_arg( 'ngg_force_update', 1, $url ); } return $url; } add_filter( ...


1

That's why the last line of the get_admin_url contains the line: return apply_filters( 'admin_url', $url, $path, $blog_id ); Any valid modification of the admin URL will be via that filter, so get_admin_url is the correct function to use in all cases.



Only top voted, non community-wiki answers of a minimum length are eligible