-
AuthorPosts
-
June 27, 2017 at 12:36 am #813264
I have a change I’ve implemented via the includes > loop-index.php file in my child theme. It’s some output from the Advanced Custom Fields plugin, which I’m adding after line 254; between where it says “echo the post content” and the next line, echo $content_output;.
I’m not a “real” programmer, so I don’t know exactly how much of that loop-index.php file I have to include in my child theme. Seems to me I should include as little as possible, to avoid interfering with changes you might make to that file in future theme updates.
Do I have to include the whole file in the child theme or can you tell me how to include only what’s necessary for my change?
Here’s a screen grab of the file with my code in place: https://www.evernote.com/shard/s320/sh/054da0f7-dcb3-4f18-86ad-1849a81380f6/995841afa8b909b1c5ae8d4f583f6978
Thanks!
June 27, 2017 at 11:53 am #813360Hey sky19er,
Can you give us temporary admin access to your website in the private content box below, so that we can have a closer look?
Best regards,
VictoriaJune 27, 2017 at 5:06 pm #813515Well, this host won’t give me ftp access, so I’m having to work on this on my localhost. Once I figure it out, I’ll have to send the host the files. I could give you WordPress admin access to the dev site, but I haven’t implemented this code there, so I don’t see how that would help. Can I email you the loop-index.php file — would that help?
June 28, 2017 at 4:39 pm #813945Hi sky19er,
You can put the code on https://pastebin.com/ and give us a link.
Best regards,
VictoriaJune 28, 2017 at 5:18 pm #813980OK, here you go — https://pastebin.com/pACcxE0F — my code starts on 257 and ends on 278. Again, I’m looking for how to include as little as possible of the loop-index.php file in the child theme, to avoid interfering with — or not benefitting from — future theme updates.
Thanks!
- This reply was modified 7 years, 5 months ago by sky19er.
June 28, 2017 at 8:28 pm #814094Hi sky19er,
Unfortunately, there is no filter here, that you could use, so you have to have the whole file in your child theme.
Best regards,
VictoriaJune 28, 2017 at 8:43 pm #814097Ah, ok, thanks anyway. So then is the thing to do to keep an eye on the change documents you put out with your theme updates, to look for changes to the loop-index.php file so I can keep my child theme version up to date?
June 29, 2017 at 1:34 pm #814449Hi sky19er,
Yep, unfortunately. You can use git to keep track of your files and merge them.
If you need further assistance please let us know.
Best regards,
Victoria -
AuthorPosts
- The topic ‘minimizing loop-index.php change via child theme’ is closed to new replies.