functions.php is always called.
But I don’t understand how you don’t get a parse error…
Declaration of the variable should be something like this:
global $removeres;
$removeres = 'remove_action: ';
Try now that echo 🙂
Thanx for pointing to my PHP problems. I corrected the code and still see nothing in my footer. And footer is called since i tried to write some text like:
before echo: <?php echo $removeres; ?>
and I see only ‘before echo’. To me it still seems that functions.php are not called.
Hmm… To see if it’s called or not, try adding a function in the functions.php
function removeres(){
echo "remove_action";
}
And then try calling it in the footer: removeres();
See if that shows anything 🙂
<br>
<b>Fatal error</b>
: Call to undefined function removeres() in
<b>...../footer.php</b>
on line
<b>2</b>
<br>
i told you, it’s not called! 🙂 what is wrong with it?
p/s/ for any case I write my functions.php
<?php
global $removeres;
$removeres = 'remove_action: ';
if (!is_admin()) {
$removeres .= remove_action( 'wp_head', 'feed_links_extra', 3 ); // Display the links to the extra feeds such as category feeds
//remove_action( 'wp_head', 'feed_links', 2 ); // Display the links to the general feeds: Post and Comment Feed
remove_action( 'wp_head', 'rsd_link' ); // Display the link to the Really Simple Discovery service endpoint, EditURI link
remove_action( 'wp_head', 'wlwmanifest_link' ); // Display the link to the Windows Live Writer manifest file.
remove_action( 'wp_head', 'index_rel_link' ); // index link
remove_action( 'wp_head', 'parent_post_rel_link', 10, 0 ); // prev link
remove_action( 'wp_head', 'start_post_rel_link', 10, 0 ); // start link
remove_action( 'wp_head', 'adjacent_posts_rel_link', 10, 0 ); // Display relational links for the posts adjacent to the current post.
remove_action( 'wp_head', 'wp_generator' ); // Display the XHTML generator that is generated on the wp_head hook, WP version
}
function removeres(){
echo "remove_action";
}
?>
In case someone has similar problems, my function.php (the one i modified) was not called, probably, due to some cache issues, after a while (several hours) – everything worked.