Tagged: child theme, excerpt, magazine
-
AuthorPosts
-
May 13, 2016 at 12:03 pm #632002
Hey
I started to use a Child theme and I can not import the modified Magazine.php into it.
I use a Magazine blog in the front page whith some excerpt, which worked great in the MAIN Theme, but not in the CHILD theme.I tried all the options I found, for example:
Functions.php
require_once( ‘config-templatebuilder/avia-shortcodes/magazine.php’ );
(from https://kriesi.at/support/topic/show-excerpt-in-all-magazine-blog-list-with-read-more-link/)but this one crashing my site (something about Problem in Line 10 in Magazne.php)
Can someone help me?
May 16, 2016 at 1:40 pm #632915Hey,
Please refer to:
Best regards,
JosueMay 18, 2016 at 10:23 am #634279Ok, did that, made the “shortcodes” Folder, copied magazine.php, still no change.
Still no excerpt in the front page.
Any thoughts?May 18, 2016 at 10:30 am #634282Hi,
Did you add this to child theme functions.php:
add_filter('avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1); function avia_include_shortcode_template($paths) { $template_url = get_stylesheet_directory(); array_unshift($paths, $template_url.'/shortcodes/'); return $paths; }
Best regards,
JosueMay 18, 2016 at 10:32 am #634283of course. followed the info in the link, added the code, added the folder, copied the modified- magazine.php (which worked in main theme), but still nothing.
May 18, 2016 at 10:33 am #634285Hi,
Can you please create us a WordPress administrator account? post it here as a private reply.
Regards,
JosueMay 18, 2016 at 10:37 am #634287There.
Thanks for your help, I hope you find a way, this excerpt thing was always a problem after an updateMay 18, 2016 at 10:52 am #634291Hi,
Need this access too.
Best regards,
JosueMay 18, 2016 at 11:00 am #634297info
May 18, 2016 at 11:10 am #634302No, it’s an .htaccess prompt. You probably don’t see it because it’s already logged in your computer, check in another browser or in incognito mode.
May 18, 2016 at 11:26 am #634315I checked everything, incognito etc, used different computers, no problem on my side, but I am not sure what your problem is.
May 18, 2016 at 12:55 pm #634376Yeah i can connect via FTP but i won’t be able to see / test anything because the site has w3c caching enabled.
May 18, 2016 at 1:01 pm #634383disabled W3 Total Cache
May 18, 2016 at 1:07 pm #634388Ok, check it.
May 18, 2016 at 1:16 pm #634402perfect, thx, what did you do?
Only magazine and functions php?May 18, 2016 at 1:17 pm #634403Hi,
Only magazine.php, line 367:
$excerpt = !empty($entry->post_excerpt) ? $entry->post_excerpt : avia_backend_truncate($entry->post_content, apply_filters( 'avf_magazine_excerpt_length' , 60) , apply_filters( 'avf_magazine_excerpt_delimiter' , " "), "…", true, '');
Best regards,
JosueMay 18, 2016 at 1:27 pm #634414thx again!
Do I have to look out when there is a theme update or the files in the child folder wont change after update?May 18, 2016 at 1:54 pm #634444It won’t change, but perhaps if -in a future patch- something is added to magazine.php you may want to merge it to get the latest features.
The modification is simply done by that line in 367, nothing else.
Best regards,
JosueFebruary 25, 2017 at 12:54 pm #751755I have the same problem in my child theme. Line 367 in magazine.php is part of a function. Could it be that the line number has changed in the meantime? Where exactly do I have to put the modification so that I am able to see an excerpt in a child theme?
March 2, 2017 at 9:00 am #754181Hi!
Please follow the instructions in the following thread.
// https://kriesi.at/support/topic/magazin-element-visible-extract/#post-523479
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.