Search Results for 'child theme'

Results from the Forum
simchris
tagDiv Member

Yes, except with major WP core and structural changes, this means some things change in the child themes, too.

Also I’m an SEO nut going on 20 years now, so technically a child theme is a CSS redirect every page load, which isn’t a great idea … e.g., load CSS file, but wait, please redirect to the REAL css file now ? Google specifically recommends not doing that.

I usually look at the changelog to see WHAT files change — if it’s just some basic stuff, I can replace those couple of files and be done. For MAJOR upgrades they often have changes to child theme, too.

Been caught by that .. upshot – up to you. I just find it safer to work off main files, and this also removes some gremlins I run into with mod_pagespeed, caching, blah blah.

Having two sets of files in theme folder annoying to me. 🙂

jcarr99
Participant
#0

I’ve altered the /public_html/wp-content/themes/Newspaper/includes/modules/td_module_single.php

Can I use this file in a child theme without issues?

elvinf
tagDiv Member

Chris,

To add —

I know you don’t agree – But I think this is where a child theme would help. Instead of reapplying customizations to several files, one would only need to make changes to the files that were updated.

In this current update none of my modified files were updated so a child theme would save me from having to redo everything. I guess I could just FTP a back up of the 10 or so files that weren’t updated.

Is this advisable? I want to make sure things don’t get out of wack.

simchris
tagDiv Member

Due to all the security changes this year in WP, which are ongoing (Akismet identified this week as major security issue, allowing commenters to hack your site!), the best plan is this:

a) make changes to the core theme files (not child theme)
b) keep track of changes made, files, line number, code snippets changed where
c) to update, download new theme version, apply your mods to same files, replace old theme folder with the new version with your replicated mods;
d) if something fails, go back to the backup

Not much TagDiv or anybody can do about ongoing security patches to the Visual Composer plugin — TagDiv doesn’t make that, nor do the theme devs around the world bundling that as groovy cool way to do page layouts.

Sadly, WordPress and all the pieces which fit together have been going through major upheaval this year — and it’s good for security, but seriously you have to get annoyed when the anti-spam tool causes your site to be hacked from comments containing “emojis” which you can’t disable in WP without adding code to the functions.php file. Sheesh.

Anyway– just some feedback. Wasn’t trying to annoy or shoot you down, just some feedback that it’s not just you; WP has been a pain in the arse this year.

I’m counting something like 100+ updates since Spring on some of our sites for WP, Akismet, Yoast, Visual Composer, etc., due to security vulnerabilities. Wild.

azzronulation
tagDiv Member

Hey Chris,

Don’t apologise for butting in. This is personally my first experience with Child Themes as usually I’d edit the “main” theme as it were, but times before I’d tweaked so much, updates usually broke the site, leaving me to either revert to a previous version, or just to refuse to update the theme entirely.

I may consider your approach as I’ve barely touched this theme due to its many customisation options.

Thanks!

simchris
tagDiv Member

Sorry to butt in, but in my experience this is exactly why I don’t use child themes as they may change over time with major updates and kind of defeats the purpose.

You might consider modifying the “main” theme for customizations, and simply keep track of the files/folder and ‘snippets’ (e.g., line xxx, block of code) in text files, so you can replicate that after an update.

This is what I do, and proves more “consistent” and limits site failure and debugging due to the main/child being out of sync.

With all the functional changes to WP of the past year, this has proven to be even more true.

Sorry, editorial over 🙂

Alin [tagDiv]
tagDiv Staff

Hi,

Do you use child theme? Maybe added a code there?
Please send an email at contact@tagdiv.com provide more details and also wp-admin access so we can take a closer look. Also paste a link to this topic so we can know who you are and what your issue is.

Thanks!

azzronulation
tagDiv Member

Final update:

Good news. I’ve fixed the problem.

It seems the new version of Newsmag has an updated td_module_single_base.php which is different to the one I’ve been using in the Child Theme. The reason I have that file in the child theme is because I followed this tutorial to hide the ads on a per-post basis:

https://forum.tagdiv.com/topic/function-to-hide-ads-and-function-to-show-author/

I have since copied the updated td_module_single_base.php and re-applied the above code found in the tutorial and things are back to normal.

I understand that this may be a totally incorrect use of the Child Theme, but it works! If you have any advice on how to better implement these changes then please let me know: aaron@n3rdabl3.co.uk

azzronulation
tagDiv Member

To quickly add to the above:

I received the white-screen when deactivating all of the plugins while the Child Theme was active, not the main theme. The main theme saw no issues when I deactivated all plugins.

azzronulation
tagDiv Member

Okay,

I forgot to mention that I’m currently using the Child Theme (as we’ve added a few customisations to the footer and functions.php)! I activated the main theme and found that the Featured Images have returned. I also discovered that deactivating all of the plugins (but Visualiser) caused the site to white-screen, so we’re looking into that at the moment.

It seems it’s entirely likely that some code we added to the Child Theme files have conflicted with the Featured Image. We’ll do some digging and update the post accordingly. Alternatively, I could send over the Child Theme files (via the email address you provided) to discuss things in more detail?

divcolors
tagDiv Member

Now this link shows up in the source code and it is a 404

http://domainxxxxxxxx/wp-content/themes/Newspaper-child/style.css This file does exist but all the link checkers show it as 404. Any solution for this 404?

Rhonda
tagDiv Member

I just downloaded the WP only files for Newspaper from Envato and installed it on my website. Then I reverted back to the child theme. I hope that was how I was supposed to do it.

Unfortunately, it did not solve the problem of the posts showing up in the wrong order.

Alin [tagDiv]
tagDiv Staff

Hi,


@newtrolluk
and @dabiathlet
You have to use the Visual Composer provided with the theme version you have on your site. The new version 4.7.4 is tested with the latest version of the theme, so if you want to use it please update to the Newspaper 6.5.1.
If you update to version 6 – https://forum.tagdiv.com/how-to-update-the-theme-2/ please also update the child theme, you can find it in the /code folder from theme files that you download from themeforest.

Thanks!

Bogdan B.
tagDiv Staff

Hi,

In order to use the header files in your child theme you can follow our child theme tutorial at section 4 about headers:
https://forum.tagdiv.com/the-child-theme-support-tutorial/

Thank you.

newtrolluk
tagDiv Member

Hi Chris, Ok I can try that out. I forgot to mention that I am using Newspaper 4.1, is last JS composer compatible with it or I need to update to Newspaper 6. Because I use a child theme I am not sure updating to 6 will cause problems.

newtrolluk
tagDiv Member

Hi,

JS composer v4.7.4 provided in your last theme’s update totally broke the layout of my site. I needed to reverse to JS composer v4.2.3, the one I was using so far, to fix the problem. I use a child theme. I understand I need to update for security reasons so how can I resolve this?

juannieva
Participant
#0

Hi there! I´m having a problem with Visual Composer. I can create new pages, but when I attemp to edit it, some rows are hidden, and the “+” button to add new rows isn´t there. How can i fix it? I’m using VC Version 4.3.4 and a child theme of Newspaper 4.6…

http://pausa.com.ar/

Regards!

adriatikxhelo8
Participant
#0

Hello,

I need to put some code at the header.php so what to do. I don’t have a header.php at my child theme files. Do I have to extract the header.pho in child theme or I need to put the code directly at the heart.pho on the newspaper file?

Bogdan B.
tagDiv Staff

Hi,

I have tested this at my end and it’s supported. You have to copy the file to your child theme and rename it (you can add a letter or number after the title) and then rename the title inside the file (the commented one): http://screencast.com/t/fQ4ZSiWr4
If you did this correctly, a new page template with the new name should appear: http://screencast.com/t/0alFFaTl8n
Now you can modify it at will.

Thanks

nucreative
Participant
#0

I want to override page-pagebuilder-latest.php in my child theme. Is this supported?

We are using Newspaper 6.3+

Bogdan B.
tagDiv Staff

Hello Rick,

Newspaper 6 is a whole new theme that is released for free for all of our existing customers so an update from 4 to 6 may cause the same issues as switching to another theme (but we did try to maintain compatibility where ever possible).
Always make a full backup of your current installation – https://codex.wordpress.org/WordPress_Backups and then do a clean update, meaning that we recommend that you delete the old version of the theme before uploading the new one – https://forum.tagdiv.com/how-to-update-the-theme-2/ update also the plugins that come with the theme files from the /plugins folder. In the “how to update” guide is specified that you will have to run the script that will import from database your settings.
The shortcodes have been changed so old ones will not work anymore. Also you have to update the child theme(if you use one), please note that old files customization or custom css will not work with the new version and you will have to adjust and re-add them.
Bottom line is that newspaper 6 is a whole new theme built from scratch.
Hope this helps!

Thank you!

  • This reply was modified 10 years by Bogdan B..
sejpost
Participant
#0

Hi
Trying to insert a custom ad spot into the mega menu. I know that it’s td_block_mega_menu.php that needs altering (we have a child theme) but I’m breaking the php file by adding shortcodes.
Can you illustrate where in the td_block_mega_menu.php file we’d call our shortcode
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);?>
Thanks
S

simchris
tagDiv Member

Most themes which auto update in WP use either a theme foundry plugin; or can be updated due to being in the WordPress theme repository (e.g., free themes).

Most commercial themes on ThemeForest and commercial plugins don’t have an “auto update” feature, and generally this is a BAD idea — for example, if people had done auto update from NP4 to NP6, and woken up to find their site broken, that would not have been good.

Similarly some plugins may change settings and require workarounds and/or a perfect example is Yoast who “updated” their old wp meta plugin, by disabling it without telling people it would disable it, even though it still worked. Then printed message on screen – “we’ve discontinued this plugin, please upgrade to Yoast SEO” — well, on one site we didn’t want to do that and had to revert to the original meta plugin. Ouch!

Envato tried to build a theme updater for their themes and you can certainly try that. But often it’s best to review the changelog and see what changed so that you don’t wipe your child theme changes if there is major child theme update, or reset your home page if VC changes, etc.

For example an auto updater today might update the entire theme by deleting old folder and any customizations, and upload new one; when only thing changed was Visual Composer update for security issue. So, today only update it the VC plugin which can be done manually via FTP.

So, while it sounds like a good idea — in practice, it’s really not that advisable.

Hope that made sense — not trying to be contrary, just some feedback from using WP for 10 years and having a lot of cock ups from “auto updates” — we turn them ALL off for our sites due to too many site crashes in middle of the night without warning, or CPU spikes crashing entire box due to a bad plugin (e.g., YOAST, often has major bugs every damn dot upgrade then rushes out 3 rounds of “oops” fixes…. seriously… never install that on “new dot upgrade” — it’s a bad bad idea!). 🙂

Alin [tagDiv]
tagDiv Staff

Hi,

Thanks Chris! The tutorial are more useful, they explain step by step how to add a custom font.


@wpdiv
Please read child theme documentation, you can see there all the files supported by child themehttps://forum.tagdiv.com/the-child-theme-support-tutorial/ I provide you an example how you can add a custom font to the stylesheet file, like the theme fonts are added you don’t have to do anything in the less file(just to see the code). Maybe the tutorials posted by Chris will help more(it is the same what I tried to explain, not so good I guess…).
You can disable google fonts via child theme using a hook, please paste this code in the child theme functions file – http://screencast.com/t/hLPMbut3GlOHhttp://pastebin.com/HjBxAmTP I have tested this on my side and it should work, please check your page source.

Hope this helps!

Alin [tagDiv]
tagDiv Staff

Hi,

Unfortunately the config file cannot be overwritten via child theme, so you’ll have to edit the main theme file.
But you can check the documentation on how to make a new module-block – https://forum.tagdiv.com/td_api_blockadd/
If you don’t have programming experience I suggest that you look for a professional developer to help you with this, you can find one on places like http://studio.envato.com/

Thanks!

Viewing 25 results - 11,626 through 11,650 (of 12,866 total)