New answers tagged


Not sure what your question exactly is but yeah - for every apply_filters( 'the_content', '...' ); all hooked filters will be executed. I wouldn't care that much how many times this happens but instead what content is being filtered each time - more the content bigger the performance penalty.


function your_function() { global $current_user; if($current_user->roles[0] == 'administrator') { add_meta_box(your parameters); // fill in your parameters } } add_action('admin_init','your_function');


You can use the exact same filter in your template files. If you do need it in functions.php for any reason (maybe you have some additional processing) then you can use your own custom filter. functions.php: function my_custom_authorpage_title( $title ) { // process ... return apply_filters( 'my_title', $title ); } add_filter( 'wpseo_title', ...


There is only <title> which is present in your example. <meta title> DOES NOT exist as far as I know :)


The solution should is this: add_filter( 'wpseo_xml_sitemap_post_priority', 'my_custom_post_xml_priority', 10, 3 ); function my_custom_post_xml_priority( $return, $type, $post) { if($type == 'page') { switch ($post->ID) { case '8': case '395': case '342': $return = 0.9; break; case ...


I just found a very simple solution. If you haven't already - install some form of a capabilities manager plugin. Then, create a new capability from within the capabilities manager - call it "CUSTOM_CAPABILITY_NAME" or whatever you want. Then assign it to a specific role or user. Important: copy and backup and file you intend to modify in case you f*ck ...

Top 50 recent answers are included