Changing templates. File permission doesn't work
-
Hey!
I wanted to change the more-link from “Continued” to “Read more”(just something else).
I’ve found this line in cleanup.php, did read about the Codex and changed file permission to 666, 777. All seemed right. But it didn’t work. As soon as I overwrite the file or update it through Editor in WP I get this:Parse error: syntax error, unexpected T_STRING in /home/myosciur/wp/wp-content/themes/virtue/lib/cleanup.php on line 106
Please, help…
I am a mac user, I have Fugu. File permission window is called Octal mode representation and it make me write four digits. I wrote 0666/0777. I don’t know whether it can be issue. Anyway.
Really would like some advice.Thank you
-
Hey,
You shouldn’t have to do anything in terms of file permissions. Just leave at 777. The error points more to something you changed in the file. What exactly did you edit because I would guess there is a php code error on line 106.Kadence Themes
You were right. It is a code error. I don’t really know php, not at all. But learning by doing. I had a breaking space in between Read and More. How do I write “Read more” in php, if it’s ok to ask? π
I wanted to change everywhere I have “Continued” to “Read more”. It’s weird when I changed cleanup-php’s “continued” to Readmore (for testing) it changed it only on some pages…
Thank u for your reply
Where you see this:
__('Continued', 'virtue')You can change to this:
__('Read More', 'virtue')As for not all places that is correct the cleanup is only for standard excerpts but the home pages “latest posts” would be different from that. (templates/home/blog-home.php)
Kadence Themes
Well, that is what I did for past a couple of hours, and it just does not work.
Parse error: syntax error, unexpected T_STRING in /home/myosciur/wp/wp-content/themes/virtue/lib/cleanup.php on line 106
That is why I thought it could be the space between the words, because now I have __(βReadMoreβ, ‘virtue’), and it doesn’t bug.
__(‘Read More’, ‘virtue’) – gives error.Odd, I just tested here to be sure and I don’t get any error.
Where are you working for this? What program are you editing in?
Here is a simple workaround:
__('Read More', 'virtue')Kadence Themes
I use Fugu, mac OS. I edit php files separately on my desktop (Fugu doesn’t allow to edit them directly through textedit). And I tried this variant as well __(‘Read More’, ‘virtue’). Still bugging.
And I might not know php that well, but I am sure I do paste and copy right π So I’m also confused.I might just leave it at that, it’s just one word.
I meant variant
Read MoreJust tried and simply added a break between Read and More directly through templates editor. After I press Update File – comes the error.
Yeah this is odd. I can’t guess why thats happening. I’m testing on a demo site without any issue.
You can use a child theme and just unhook the function in the theme and hook in your own function.
In the child theme functions.php file it would look like this:
function custom_kadence_excerpt_more($more) { return ' … <a href="' . get_permalink() . '">' . __('Read More', 'virtue') . '</a>'; } remove_filter('excerpt_more', 'kadence_excerpt_more'); add_filter('excerpt_more', 'custom_kadence_excerpt_more');Kadence Themes
Thank you for your help, really appreciate this.
I understood that the child theme is a good thing to have. I have been trying to fix that, but it is a little bit advanced, I’m getting -“The following themes are installed but incomplete. Themes must have a stylesheet and a template.”- in the Themes section, although I do as it says in the faq, and I do have style.css with the header + functions.php. I am not sure how do I proceed π and I guess it’s a different issue for a different topic.
I will try to fix that after New Years, will see how it goes, because I’d love to get a Child theme, seems like the best option. Hopefully it will solve the problem, otherwise I could leave it at that πYou can download an example child theme here: http://www.kadencethemes.com/child-themes/
Kadence Themes
Ah, thank you Child Theme is activated! (Widgets get messed up, but it appeared to be fixable).
Although your code didn’t change “Continued” π
you can see it here: http://viktoriagarvare.com/blog/journal/I copy/pasted it to the functions.php file. No result
Hey,
The page you linked to is not showing an excerpt. It’s showing the full content until your read more tag, WordPress handles this differently and the continued for that is in the file “templates/content-fullpost.php” line 74.Hope that helps.
Kadence Themes
It is indeed very weird π
It helped (meaning, it was the right ‘continued’), but the actual problem is still in place.
After I changed “Continued” to “Read more” I got this:“Parse error: syntax error, unexpected T_STRING in /home/myosciur/wp/wp-content/themes/virtue/templates/content-fullpost.php on line 74”
and I changed it again to “Readmore” without a space in between and it looks like this: http://viktoriagarvare.com/blog/journal/
I don’t know what is it why this problem occurs.
I think I will have to live with the “Continued” π Maybe it is something with my connection, server reads it wrong or something. I’m not good in all that.Thank you for your help. I love the theme π
The topic ‘Changing templates. File permission doesn't work’ is closed to new replies.
