crashed site: after modify child function.php :HELP
-
Hello, I have a big problem with the site Graphene has crashed. What I wanted to do was hide in the footer the written word press.
What I did:
1) I put in the child function.php code written by developer:
<? php
graphene_filter_gettext function ($ translated, $ original, $ domain) {
$ strings = array (
'Powered by% 1 $ s and the% 2 $ s.' => 'This site does not have Super Cow Power!'
);
if (empty ($ strings [$ original])) {
$ translations = & get_translations_for_domain ($ domain);
$ translated = $ translations-> translate ($ strings [$ original]);
}
return $ translated;
}
add_filter ('gettext', 'graphene_filter_gettext', 10, 3);
>2) crashed: browser send me write: in salvatoristudioingegneria.com / httpdocs / wp-content / themes / graphene-child total
3) by ftp i try to delete code (orihìginally child function.pho WAS EMPTY, is Prasanna method)
4) Also with php function child emty not work
PLease help
Hi Andrea,
I’m not sure what you’ve done or how to fix your crash… but I think I found out before how to take away the part about wordpress at the footer.
First check in the graphene options -> General -> Footer options, and you can change the text there.
Also, in graphene options -> Display -> Custom CSS, write this code:
#developer {
display: none;
}That’s what I did. Is this what you meant?
you are rigt.. i’m a dummy, and reading one post written by SAhir, i had modied function.php field; this file was empy, after my wong , site crashed. Returned by ftp, erased all child funcion.php files, but nothing: as you can see, site is dead.
What cai i do? the problem is function.php child theme.
If i know how to change thema, by FTP, i would try fix problem.. but i don’t kow how switch themes by ftp, or restoring an older cchild function.php..
very bad moment
thanks for reply
There shouldn’t be any space between
<?
andphp
. You didn’t properly close the php tag as well. The last line is missing a?
. It should be?>
Try this,
<?php
function graphene_filter_gettext( $translated, $original, $domain ) {
$strings = array(
'Powered by %1$s and the %2$s.' => 'This site does not have Super Cow power!',
);
if ( ! empty( $strings[$original] ) ) {
$translations = &get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}
return $translated;
}
add_filter( 'gettext', 'graphene_filter_gettext', 10, 3 );
?>You can edit child-theme functions.php using (cPanel) file manager or FTP
Put code in between backtick (
Code:`) characters in this forum. It’s usually located above the Tab key on your keyboard. I’ve edited your post.
Mod
Totally unrelated, but try this:
#header-menu-wrap {
margin-top: -290px !important;
}Your menu stays all the way at the top that way.
Tks to all and in special mode to PRasanna . Testerday we worked hardly (exspecally Prasanna, i ‘m simple beginner).. via ftp he cleaed my database, and after i asked tosing service a restore form backup.
Unfortunately I haven’t enough konoweledge to undestand why and how wsa happenfded, but i know that the crash was due to insert code above in php function child. I wrote this only for allerting beginner people,lke me, to avoid this operation.
Now site working, sure i losted three days work, but this is best effort..
Thanks to all!
Andrea
Mod
Quote:sure i losted three days workBut if you learned something from it, it’s not exactly wasted. What you learn now could say countless days down the road.
Ok Kenneth, you are right. English is not my native langiage and i mad mistakes in written. Simly, like a beginner, i suggest to other beginner more careful to inject code in child function.php. Prasanna had correct my codes, but this codes comes from here, i ‘m not sure able to write me..
Prasanna (again thanks) explain me that problems were if upload wordpress in hosting was create by installer’s hosting.
Viewing 8 posts - 1 through 8 (of 8 total)
- You must be logged in to reply to this topic.