Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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!

    #813360

    Hey 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,
    Victoria

    #813515

    Well, 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?

    #813945

    Hi sky19er,

    You can put the code on https://pastebin.com/ and give us a link.

    Best regards,
    Victoria

    #813980

    OK, 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, 4 months ago by sky19er.
    #814094

    Hi 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,
    Victoria

    #814097

    Ah, 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?

    #814449

    Hi 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

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘minimizing loop-index.php change via child theme’ is closed to new replies.