Search Results for 'child theme how to functions.php'

Results from the Forum
Catalin
tagDiv Staff

Hi,

Most of the theme files were moved into the tag div composer plugin as per the requirements of Envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements. We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css, as there are very few files left in the main theme as Envato, requires all functionality to be added through plugins.
Now the child theme is limited to just a few files. This is a consequence of the recent modifications to the location of theme files, due to Envato requirements. In this case, you will need to make all of your additional customizations through the main theme files.

Sorry for the inconvenience and thank you for understanding.

Calin
tagDiv Staff

Hi,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Please check this topic -> https://forum.tagdiv.com/topic/important-new-update-newspaper-9-7/

Sorry for the inconvenience and thank you for understanding.

cre8
tagDiv Member

Well, maybe envato’s terms have these requirements. But these requirements are absolutely opposite to what WordPress says for changes in theme files using a child theme. This is absurd in my opinion. Even so, you could create a function so we’re able to create overrides for the tagdiv composer plugin. There are plenty of plugins to offer that.

Edit: Reading more carefully in Envato’s requirements they don’t say anywhere to remove every override capability https://help.author.envato.com/hc/en-us/articles/360000480723#h_5966589781211522283728890. Unless I’m mistaken. They say:

If a child theme is provided with the theme, it must:

  • Load the parent stylesheet using wp_enqueue_style() instead of @import.
  • Consist of style.css, functions.php and screenshot.png files at a minimum.
  • Append “Childto the theme name so it can be identified as a child theme.
  • Include files within the child theme directory using get_stylesheet_directory().
  • Reference the parent theme via Template: parameter in the style.css header
  • The child theme will be held to the same standards and best practices as the parent theme. For more information on Child Theme development, refer to WordPress Codex article.
kumushka
tagDiv Member

Hi!
I generally make a new child theme only from the style.css and functions.php files. I take files from your documentation from the downloaded archive. As soon as I activate the child theme, the AMP item in the WP panel disappears. I remove the child theme – it appears.
In addition, a simple shortcode to replace text that works in version 9.6.1 in functions.php refuses to work in version 9.7.1. And does not work in the AMP version of the page.
In version 9.7.1, the changes (added js codes) in the child theme in the loop-single.php file do not work either. You did not move it to the tagdiv composer plugin.

Does the child theme work at all?

  • This reply was modified 7 years by kumushka.
Catalin
tagDiv Staff

Hi MKJ,

Please notice that for each up theme update you need to make a full backup to your database to avoid losing all of your data. Regarding on child theme, please notice that’s the consequence of moving the theme core files.

Most of the theme files were moved into the TagDiv composer plugin as per the requirements of Envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements. We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css, as there are very few files left in the main theme as Envato, requires all functionality to be added through plugins.

Thank you for understanding!

Calin
tagDiv Staff

Hi,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

maumbury
tagDiv Member

I have tried an unmodified child theme, so no changes to the functions.php or style.css with the same result.

I do not understand why this does not work after your changes for Envato, if you are correct that means we have to choose between a child theme or AMP with all Envato themes. Hope you get it working in next release.

Still love the theme

Calin
tagDiv Staff

Hi,

New the single_template_1.php can be found in wp-content/plugins/td-composer/legacy/Newspaper/parts/single/single_template_1.php -> https://www.screencast.com/t/Fu7JfEo6ctB

Unfortunately these files can not longer be set in child theme.

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Hope this will help you!
Thanks.

Catalin
tagDiv Staff

Hi all,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements. We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding!

Calin
tagDiv Staff

Hi,

Unfortunately in Newspaper v9.7 the td-api-plugin will not longer work, sorry! you can achieve the modules that you made with that api using the flex blocks and you can save the element in a shortcode to can use it later in orders pages -> https://www.screencast.com/t/a2ikt4tq

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

Calin
tagDiv Staff

Hi,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

wspeed
Participant
#0

Hi Team,
I tested but I decided not to use the Mobile Theme as I would have to rebuild my entire website (which is not an option right now).

We started to use Mega Menu feature (which is quite nice), but as it doesn’t load on mobile, we would like to have different menus from desktop and mobile.

Is there a way to accomplish that?

The only other way I can think of is via functions.php using child theme… but I’m not very clear on what needs to be accomplished if I use that way.

I searched on the forums and I might do something like this:
if ( wp_is_mobile() ) {
wp_nav_menu( array( 'menu' => 'mobile-menu' ) );
} else {
wp_nav_menu( array( 'menu' => 'desktop-menu' ) );
}

Please advise.

Bogdan B.
tagDiv Staff

Hello,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, style.css and the few files left in the main theme folder as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

Calin
tagDiv Staff

Hello,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

Bogdan B.
tagDiv Staff

Hello,

The new theme update made a few changes to the folder structure.
Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.

We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/

Moving forward with such requirements, a child theme will only work with functions.php, style.css and the few files left in the main theme folder as envato requires all functionality to be added through plugins.

You can find the files needed inside the tagDiv Composer plugin folder.

Sorry for the inconvenience and thank you for understanding.

Bogdan B.
tagDiv Staff

Hello,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, style.css and the few files left in the main theme folder as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

Bogdan B.
tagDiv Staff

Hello,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, style.css and the few files left in the main theme folder as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

Bogdan B.
tagDiv Staff

Hello,
This issue comes from using a child theme in the current theme version.
Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css and the few files left in the main theme folder as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

Bogdan B.
tagDiv Staff

Hello,

Please note that the child theme cannot affect plugins.
Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css (and the files that remain in the root folder of the theme) as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.
What is the modification you made to the templates as maybe you can implement it through the tagdiv composer and cloud library.

Thank you!

Bogdan B.
tagDiv Staff

Hello,

Most of the theme files were moved into the tagdiv composer plugin as per the requirements of envato: https://help.author.envato.com/hc/en-us/articles/360000472383-WordPress-Theme-Requirements.
We wrote an article on the subject here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/
Moving forward with such requirements, a child theme will only work with functions.php, and style.css as there are very few files left in the main theme as envato requires all functionality to be added through plugins.

Sorry for the inconvenience and thank you for understanding.

On the bright side is you do not have to alter the theme code to make modifications to the header. Please read this guide to create a custom header design using the cloud library: https://tagdiv.com/newspaper-theme-customize-the-header-manager/

Thank you!

xxxLesy
Participant
#0

I made a minor change in /includes/wp_booster/wp-admin/content-metaboxes/td_template_settings.php – specifically to make source and via fields visible to all writers (by changing appropriate publish_posts requirement to edit_posts). But just adding the modified file to my child theme doesn’t make a difference. I assume I have to somehow link to it in child theme functions.php.

How can I link this modified file to be pulled from the child folders? (I don’t know php, so copy-paste instructions would be highly appreciated).

Calin
tagDiv Staff

Hi,

Please make sure that all the settings are like in our requirements, please follow the guide carefully
https://forum.tagdiv.com/requirements-for-newspaper/
and please increase all requirements that are lower, and follow all steps.
WP_MEMORY_LIMIT try to increase it at least to 256mb.
Also please check the php version to be 7-7.2

Please make sure that you do not have a plugin conflict, please deactivate all non theme plugins, also if you are using child theme or cache plugin, please deactivate them, clear all cache and try again.

Please provide me a link were I can inspect this problem, in this way I will be able to provide you a better answer.

In order to remove some pages to be show in search results you can use some code that need to be set in wp-content/themes/Newspaper/functions.php
-> https://www.screencast.com/t/Dg9yNRDuu
You can check some more details about How to Remove Certain Pages and Posts from Search Results in WordPress here -> https://www.webhostinghero.com/blog/remove-certain-pages-and-posts-from-search-results-in-wordpress/

Thanks!

bxp331
Participant
#0

After activating a child theme (wp-content/themes/Newspaper-child), the Theme Panel > Custom Code > Custom CSS screen hangs upon saving. When I go back to using the parent theme, the issue resolves itself.

Is there a fix for this?

I am including the code for my child theme’s functions.php and style.css files.

Thanks, as always!

HANGING SCREEN – CUSTOM CSS:
https://ibb.co/YBFZRt5

FUNCTIONS.PHP

<?php
add_action( 'wp_enqueue_scripts', 'my_theme_enqueue_styles' );
function my_theme_enqueue_styles() {
$parent_style = 'Newspaper-style'; // This is 'twentyfifteen-style' for the Twenty Fifteen theme.
wp_enqueue_style( $parent_style, get_template_directory_uri() . '/style.css' );
wp_enqueue_style( 'child-style',
get_stylesheet_directory_uri() . '/style.css',
array( $parent_style ),
wp_get_theme()->get('Version')
);
}
?>

STYLE.CSS

/*
Theme Name: Newspaper Child
Theme URI: http://xyz.com/newspaper-child/
Description: Newspaper Child
Author: XYZ, Inc.
Author URI: http://xyz.com
Template: Newspaper
Version: 1.0.0
License: N/A
License URI: N/A
Tags: news
Text Domain: newspaper-child
*/

Calin
tagDiv Staff

Hi,

If you are using the mobile theme you’ll need to set the code for shortcode from child theme in mobile function too, because the child theme is not working for plugins, only for theme, here is the path -> wp-content/themes/Newspaper/mobile/functions.php
-> https://www.screencast.com/t/IgOtHRBlGaAS

Thank you!

lazdim
Participant
#0

Hi,
I add a “Text with Header” element via tdComposer.
I have created a shortcode [foobar] in functions.php of the child theme.
I add [foobar] in the text field and the content of the shortcode shows just fine.
I save the page using tdComposer.
When I try to edit the page agin with tdComposer I get the following error:
Errors at columns: 2(models) : 8(dom). The model does not match the content
Help, please?

Viewing 25 results - 301 through 325 (of 638 total)