Notice: These forums are now retired and closed. For active support, please Submit a Ticket or visit our official WordPress.org community pages.
Kadence Theme | Kadence Blocks | Starter Templates | WooCommerce Email Designer | Ascend | Virtue | Pinnacle

Child theme functions.php only accepts and reads code addings but not removals.

Home / Forums / Kadence Theme / Child theme functions.php only accepts and reads code addings but not removals.

This topic is: Resolved
[Resolved]
Posted in: Kadence Theme
Anonymous
June 19, 2021 at 5:31 am

Hello,

Trouble with functios.php again. Whenever I write code in child theme functions.php it goes through but then If I go and delete what I wrote, it won’t change the previous actions. Like it accepts adding code but not removing it. I disabled caching plugins and purged all cache but still the edits remain even after deleting them fron the .php file.

This time its the post format function that got stuck. I wanted to check it out on kadence as this theme doesn’t support it natively , therefore I added a function for post format to appear and it did in Posts so I could now choose and experiment with post formats. Now I wanted to remove it and I went ahead and just removed what I previously wrote and refresh the page and the post format box is still there and won’t delete. I changed to regular parent theme and there , also, the post format is in place. I check to erase with new code in functions.php [parent] and It did.

I typed this into my regular parent kadence theme [ not the child theme ] ”add_action( ‘init’, ‘remove_post_format’);

function remove_post_format() {
remove_theme_support( ‘post-formats’ );
}”

And it removed the post format, I went ahead and deleted it again and it brings it back. So natively kadence theme doesn’t support post format, how come it now only removes it by adding code. I don’t want to use this code in order to have it removed, because before I added the functions in child theme to have post formats there weren’t any by default. I want the default setting back without using code.
I want to continue using child themes but everytime I make a change to functions.php it is like permanent.
Last time I went ahead and removed the // to accept style.css from child theme , It worked for one edit and then the communication stopped. And its not the cache as I told you I removed the caching plugin.

So there must be something above functions.php that locks in the edits I make and wont erase them just by deleting code in functions.php.

  • The forum ‘Kadence Theme’ is closed to new topics and replies.