- NewspaperChild Theme Support
I found that you have to replace all shortcodes since in v6 they are gone and are placed with simple HTML blockquotes. I had to run search/replace on the database to get all shortcodes replaced with proper HTML tags.
Also, I found during upgrade you will most likely need to “import” dummy content but without content. So it imports settings, otherwise it looks like crap.
Typography is also gone, it’s not imported automatically even if you use their v4 to v6 upgrade. All fonts reset to default.
If you’re using child theme from v4, you must replace top portion of the functions.php, it changed and will cause issues. Just compare new v6 child functions.php and replace your old default part at the top with the new code.
Same goes for header.php and footer.php, they’ve made changes so you need to make sure if you have customer header.php and footer.php in your child theme that you compare these files to v6 files and update necessary code to match v6. They are different from v4, you’ll get blank screen.
thx Alin
unfortunately I’m not able to resolve the issue. At this moment all plugins are deactivated except composer and I get
Fatal error: Call to undefined function get_base_recaptcha_lang_code
I think I played too much with fucntion.php would be cool if someone would take a look and I think the prob for the jquery messages may lay here too.
EDIT: ok I commented the lang part out and now it works, somehow it was anyway double. The slider is also visible now though the thumbs and image are scaled too large, how can fix that one ?
On the jquery error before I assume I activate plugins one by one and see where the pain comes right ? and off I go..
<?php
/* ----------------------------------------------------------------------------
WordPress booster framework - this is our theme framework - all the content and settings are there
It is not necessary to include it in the child theme only if you want to use the API
*/
if (!defined('TD_THEME_WP_BOOSTER')) {
include TEMPLATEPATH . '/includes/td_config.php';
include TEMPLATEPATH . '/includes/wp_booster/td_wp_booster_functions.php';
}
/*include theme.js under newsmag to put modal image on*/
/* include theme.js*/
/*wp_enqueue_script( 'theme-js', get_stylesheet_directory_uri() . '/js/theme.js', array( 'jquery'), NULL, TRUE );*/
remove_action( 'wp_head', 'wp_generator' ) ;
remove_action( 'wp_head', 'wlwmanifest_link' ) ;
remove_action( 'wp_head', 'rsd_link' ) ;
remove_action( 'wp_head', 'feed_links', 2 );
remove_action( 'wp_head', 'feed_links_extra', 3 );
add_filter( 'pre_comment_content', 'wp_specialchars' );
function no_errors_please(){
return 'You appear to be up to no good. Please stop now!';
}
add_filter( 'login_errors', 'no_errors_please' );
// and we hook our function via
add_action( 'wp_before_admin_bar_render', 'mytheme_admin_bar_render' );
function delete_enclosure(){
return '';
}
add_filter( 'get_enclosed', 'delete_enclosure' );
add_filter( 'rss_enclosure', 'delete_enclosure' );
add_filter( 'atom_enclosure', 'delete_enclosure' );
// function remove_cssjs_ver( $src ) {
// if( strpos( $src, '?ver=' ) )
// $src = remove_query_arg( 'ver', $src );
// return $src;
// }
// add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
// add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'jpeg_quality', create_function( '', 'return 65;' ) );
//remove render blocking by jetpack
add_filter( 'jetpack_implode_frontend_css', '__return_false' );
function remove_pingback_url( $output, $show ) {
if ( $show == 'pingback_url' ) $output = '';
return $output;
}
add_filter( 'bloginfo_url', 'remove_pingback_url', 10, 2 );
// add_action('init', 'myoverride', 100);
function myoverride() {
remove_action('wp_head', array(visual_composer(), 'addMetaData'));
}
function dequeue_visual_composer_css() {
if (is_single()) {
wp_dequeue_style('js_composer_front');
}
}
// Defer jQuery Parsing using the HTML5 defer property
if (!(is_admin() )) {
function defer_parsing_of_js ( $url ) {
if ( FALSE === strpos( $url, '.js' ) ) return $url;
if ( strpos( $url, 'jquery.js' ) ) return $url;
// return "$url' defer ";
return "$url' defer onload='";
}
add_filter( 'clean_url', 'defer_parsing_of_js', 11, 1 );
}
// Remove WP version number from js and css files.
function remove_cssjs_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
}
add_filter( 'style_loader_src', 'remove_cssjs_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_cssjs_ver', 10, 2 );
function tweakjp_add_sharing_js() {
wp_enqueue_script( 'sharing-js', WP_SHARING_PLUGIN_URL . 'sharing.js', array( ), 4 );
$sharing_js_options = array(
'lang' => get_base_recaptcha_lang_code(),
'counts' => apply_filters( 'jetpack_sharing_counts', true )
);
wp_localize_script( 'sharing-js', 'sharing_js_options', $sharing_js_options );
}
add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_js' );
function tweakjp_add_sharing_css() {
wp_enqueue_style( 'sharing', WP_SHARING_PLUGIN_URL. 'sharing.css', false, JETPACK__VERSION );
}
add_action( 'wp_enqueue_scripts', 'tweakjp_add_sharing_css' );
-
This reply was modified 11 years by
cem.
Hi, I once dit it this way in the child theme:
//functions.php
add_action( 'after_setup_theme', 'my_change_metabox' );
function my_change_metabox ()
{
if (is_admin()) {
$my_td_metabox_theme_settings = new WPAlchemy_MetaBox(array(
'id' => 'td_post_theme_settings',
'title' => 'Post settings',
'types' => array('post','page','cpt'),
'priority' => 'high',
'template' => get_template_directory() . '/includes/wp_booster/wp-admin/content-metaboxes/td_set_post_settings.php',
));
}
}
regards
I want to create a child theme which will allow the NewsMag Product Ratings to be entered in wp-admin on a points scale of 0 to 20 but displayed on the post page as a star rating between 0 and 5. The reason for this is that I want to be able to export the ratings data to another application which supports ratings on a scale of 0 to 20. I can’t see any easy way of doing this. td_set_reviews.php can’t be modified from a child theme because it is used from within td_templates_settings.php which is included from functions.php using require_once. So effectively the ratings functionality is not pluggable.
Is there any way around this?
Yep. The only fix is to not use theme panel “over rides” for default colors, and make those changes directly to the style.css file.
Otherwise what is basically happening is
a) main CSS loads
b) CSS over-rides load
as you might expect in many situations due to the complexity of certain pages; especially with complex home page, and complex mega-menu — there is a couple msecs delay in there.
Also avoid using child theme on top of that since all child themes are basically redirects from one theme to another — which Google doesn’t recommend — but WordPress has made this their standard practice. Best to just edit the main theme, since with major theme updates, the child theme needs changes too and defeats purposes of using child theme to avoid not having to re-apply changes.
Much like WooCommerce — changes are done to functions.php — and one has to reapply them each time there is update.
Anyway — that’s been my experience. 🙂
The first thing that springs to mind, is that we are using the child theme (as we plan to make customisations). Could this be the reason that those lines in functions.php are not taking effect?
Edited to add: we have not yet made any code changes at all – this is a fresh install.
-
This reply was modified 11 years by
nucreative.
Hi everybody.
I have a problem with the child theme creation. When I try to generate a child theme I get this message :” Fatal error: Cannot redeclare _verify_isactivate_widgets() (previously declared in .mywebsite./httpdocs/wp-content/themes/Newsmag-child/functions.php:14) in .mywebsite./httpdocs/wp-content/themes/Newsmag/functions.php on line 99
I dont find out how to risolve this issue.
Hope somebody can help me with it.
Thanks guys
(sorry for my english, is not my language)
Hi, you should actually put it in functions.php after parent theme has been setup, something like this:
add_action( ‘after_setup_theme’, ‘child_after_setup_theme’ );
function child_after_setup_theme ()
{
td_api_module::update_key(‘td_module_1′,’file’,get_stylesheet_directory() . ‘/XXX-RELATIVE-PATH-FROM-CHILD-THEME/td_module_1.php’);
}
Best regards
Hi everyone,
Is there a way to use custom post template for specific post category?
I did like this:
Created function in functions.php which gets post slug and tries to find file single-{slug}.php.
If such file exists it uses it for template.
As in Newspaper theme post templates are not formed in usual way (as default WordPress does) I cannot find the right code to paste in single-{slug}.php. I just need it to work correctly like loop-single.php template.
I see, that template is formed from header->header-style->loop-single files. But when I try to combine the code inside single-{slug}.php it breaks the layout.
Of course I can keep searching for bugs and finally fix them, but maybe it is some other … more easy way to make it work.
I don’t know if it matters, I’m using childtheme.
Thank in advance.
Hi,
I’ve added two custom blocks in my Newsmag child theme using your “td_api_module” and “td_api_block” class inside my functions.php:
td_api_module::add('td_module_17',
array(
'file' => get_stylesheet_directory() . '/includes/modules/td_module_17.php',
'text' => 'Module 17',
'img' => get_stylesheet_directory_uri() . '/images/panel/modules/td_module_17.png',
'used_on_blocks' => array('td_block_17'),
'excerpt_title' => 12,
'excerpt_content' => '',
'enabled_on_more_articles_box' => true,
'enabled_on_loops' => true,
'uses_columns' => true, // if the module uses columns on the page template + loop
'category_label' => true
)
);
td_api_block::add('td_block_17',
array(
'map_in_visual_composer' => true,
"name" => 'Block 17',
"base" => 'td_block_17',
"class" => 'td_block_17',
"controls" => "full",
"category" => 'Blocks',
'icon' => 'icon-pagebuilder-td_block_8',
'file' => get_stylesheet_directory() . '/includes/shortcodes/td_block_17.php',
"params" => array_merge(
td_global::get_map_filter_array(),
td_global::get_map_block_array()
)
)
);
I’ve added this module and block using the init-hook. The module then shows up inside the theme panel, e.g. categories. But “block 17” doesn’t appear inside the widget page. What am I doing wrong?
Another problem concerns the typography: Is it possible to change the h4 inside the block_title to h2?
Thanks!
Hi,
struggling for this to work in newsmag I found two alternatives I would like to share:
1. Do the same as this,
but add one item to the array named ‘installed_post_types’ with the post-types needed:
‘installed_post_types’=>’post,page’
This approach has the disadvantage of touching the theme source code.
2. This is kind of tricky: create a child-theme and a new folder named ‘override’ or whatever. Copy td_block_mega_menu.php to that folder (Note that this file is internal and is not overriden by the general child theme method described in the documentation). In that copy, change render method to add ‘installed_post_types’ to the array before performing the query as in the previous paragraph.
Now, in your functions.php create a hook for ‘after_setup_theme’. This will be get called after parent newsmag/newspaper theme is finished.
Then you will have to change the api file for the megamenu block, invoking td_api_block::update_key (‘td_block_mega_menu’,’file’,FULLPATHTOMYNEWFILE);
Now when a megamenu is to be created, the overriden file is chosen instead of the core one.
This method is valid for updating some api blocks and files without touching parent theme.
P.D. Forgot to mention, first of all you should add category taxonomy to pages, using a plugin or in child-theme with register_taxonomy_for_object_type
Best regards
Just for those who tend not to look at changelog, I’ve gone ahead and posted that here, for those who need it — since I was just looking at that myself.
ALSO: suggestion, use my “moving to newsmag” sticky as process for updating theme to minimize the change of “white screen of doom” or the server 500 issue (stupid Visual Composer!!!!) 😉
===================
[ Version 1.6 ]
– fix: when you have background color on site, the color disappear on post style 6
– fix: the two strings that where not translated properly
– fix: arrow list shortcode
– fix: issue with page template options on sites that did not use the english language
– fix: featured image placeholders now work as expected again
– fix: hide and show category label panel setting
– fix: search icon click on affix was going back to top
– fix: excerpt not working for trending now
– fix: excerpt missing for mega menu title
– fix: links that contained only #_and_something did not work
– fix: https issue on backend. TinyMCE font was loaded via HTTP
– fix: astpect ration for vimeo videos
– fix: missing translation
– improvement: better top bar settings
– improvement: social icons moved in their own panel in backend
– improvement: better footer panel with better text and better organization
– improvement: better woocommerce 2.3 compatibility
– improvement: faster category page, the system that pulls the subcategories uses two less queries
– improvement: removed width of the top bar for better spacing
– improvement: removed the texture from parallax templates (prevent flickering)
– new: footer template system
– new: category template system + category top post style template. Currently we do not deliver any new templates but this system paves the way for easy user customizations via plugins and it also allows us to add new styles.
– new: when subcategories don’t fit in the category page, the theme will make a drop down with the excess categories
– new: RGBA color picker in panel. You can now use colors with alpha blending (transparency) on all the elements of the theme that support colors
VISUAL COMPOSER
28.01.2015 – ver 4.4.2
– Extra CSS class can be used in grid elements now
– Single image styles fixed
– added action “vc_load_default_templates_action”
– vc_add_default_templates() fixed
– Added compatibility for older Layer slider
– Background disappearing in row on child element deleting fixed
– Message box backwards compatibility added
– Grid builder ajax stability improved
– Css tpl for Design options regenerated
– Custom query in Grid builder handles correctly ampersand and quote marks
– Compatibility with jwplayer improved
– Compatibility with ACF improved
===================================
Here is a list of all the changes between v 1.5 and v 1.6
===================================
Modified files – 83 files
•category.php
•footer.php
•functions.php
•header.php
•includes\js_files\td_main.js
•includes\less_files\category.less
•includes\less_files\footer.less
•includes\less_files\header.less
•includes\less_files\menu-header.less
•includes\less_files\page.less
•includes\less_files\pagebuilder\shortcodes\blocks.less
•includes\less_files\post-templates.less
•includes\less_files\pulldown-filter.less
•includes\less_files\type.less
•includes\less_files\woocommerce.less
•includes\modules\td_module_mx1.php
•includes\modules\td_module_single.php
•includes\modules\td_module_trending_now.php
•includes\plugins\td-social-counter.zip
•includes\plugins\td-speed-booster.zip
•includes\shortcodes\td_block_big_grid.php
•includes\shortcodes\td_block_mega_menu.php
•includes\shortcodes\td_block_trending_now.php
•includes\td_config.php
•includes\td_css_generator.php
•includes\wp_booster\td_autoload_classes.php
•includes\wp_booster\td_block.php
•includes\wp_booster\td_block_widget.php
•includes\wp_booster\td_css_buffer.php
•includes\wp_booster\td_global.php
•includes\wp_booster\td_global_blocks.php
•includes\wp_booster\td_module.php
•includes\wp_booster\td_page_generator.php
•includes\wp_booster\td_social_icons.php
•includes\wp_booster\td_util.php
•includes\wp_booster\td_wp_booster_functions.php
•includes\wp_booster\wp-admin\content-metaboxes\td_set_post_settings.php
•includes\wp_booster\wp-admin\content-metaboxes\td_set_reviews.php
•includes\wp_booster\wp-admin\content-metaboxes\td_set_smart_list.php
•includes\wp_booster\wp-admin\css\panel\controls.less
•includes\wp_booster\wp-admin\css\panel\navigation.less
•includes\wp_booster\wp-admin\css\wp-admin.css
•includes\wp_booster\wp-admin\css\wp-admin.less
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-ads.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-analytics.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-back.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-background.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-block.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-categories.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-color.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-css.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-excerpts.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-footer.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-header.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-post.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-responsive.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-template.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-translation.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-typography.png
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-welcome.png
•includes\wp_booster\wp-admin\js\td_wp_admin.js
•includes\wp_booster\wp-admin\panel\td_panel.php
•includes\wp_booster\wp-admin\panel\td_panel_generator.php
•includes\wp_booster\wp-admin\panel\views\ajax_boxes\td_panel_block_settings\td_thumbs_on_modules_and_blocks.php
•includes\wp_booster\wp-admin\panel\views\ajax_boxes\td_panel_categories\td_get_category_section_by_id.php
•includes\wp_booster\wp-admin\panel\views\ajax_boxes\td_panel_translations\td_translations.php
•includes\wp_booster\wp-admin\panel\views\td_panel_block_settings.php
•includes\wp_booster\wp-admin\panel\views\td_panel_categories.php
•includes\wp_booster\wp-admin\panel\views\td_panel_excerpts.php
•includes\wp_booster\wp-admin\panel\views\td_panel_footer.php
•includes\wp_booster\wp-admin\panel\views\td_panel_header.php
•includes\wp_booster\wp-admin\panel\views\td_panel_post_settings.php
•includes\wp_booster\wp-admin\panel\views\td_panel_template_settings.php
•includes\wp_booster\wp-admin\tinymce\tinymce.php
•loop.php
•parts\header\header-menu.php
•parts\header\top-menu.php
•parts\header\top-widget.php
•parts\page-category-big-grid.php
•parts\page-category-header.php
•single.php
•style.css
•td_less_editor-style.php
New files – 105 files
•images\panel\category_templates\icon-category-1.png
•images\panel\category_templates\icon-category-2.png
•images\panel\category_templates\icon-category-top-1.png
•images\panel\category_templates\icon-category-top-2.png
•images\panel\footer_templates\icon-footer-1.png
•images\panel\footer_templates\icon-footer-2.png
•images\panel\footer_templates\icon-footer-3.png
•images\panel\footer_templates\icon-footer-4.png
•images\panel\footer_templates\icon-footer-5.png
•images\panel\footer_templates\icon-footer-6.png
•images\panel\footer_templates\icon-footer-7.png
•images\panel\footer_templates\icon-footer-8.png
•images\panel\footer_templates\icon-footer-9.png
•images\panel\modules\td_module_1.png
•images\panel\modules\td_module_10.png
•images\panel\modules\td_module_11.png
•images\panel\modules\td_module_12.png
•images\panel\modules\td_module_13.png
•images\panel\modules\td_module_14.png
•images\panel\modules\td_module_15.png
•images\panel\modules\td_module_2.png
•images\panel\modules\td_module_3.png
•images\panel\modules\td_module_4.png
•images\panel\modules\td_module_5.png
•images\panel\modules\td_module_6.png
•images\panel\modules\td_module_7.png
•images\panel\modules\td_module_8.png
•images\panel\modules\td_module_9.png
•images\panel\single_templates\single_template_1.png
•images\panel\single_templates\single_template_2.png
•images\panel\single_templates\single_template_3.png
•images\panel\single_templates\single_template_4.png
•images\panel\single_templates\single_template_5.png
•images\panel\single_templates\single_template_6.png
•images\panel\single_templates\single_template_7.png
•images\panel\single_templates\single_template_8.png
•images\panel\single_templates\single_template_default.png
•images\panel\smart_lists\td_smart_list_1.png
•images\panel\smart_lists\td_smart_list_2.png
•images\panel\smart_lists\td_smart_list_3.png
•images\panel\smart_lists\td_smart_list_4.png
•images\panel\smart_lists\td_smart_list_default.png
•includes\block_templates\td_block_template_1.php
•includes\category_templates\td_category_template_1.php
•includes\category_templates\td_category_template_2.php
•includes\category_top_posts_styles\td_category_top_posts_style_1.php
•includes\category_top_posts_styles\td_category_top_posts_style_2.php
•includes\modules\td_module_mx5.php
•includes\modules\td_module_mx6.php
•includes\modules\td_module_mx_empty.php
•includes\wp_booster\external\kint\composer.json
•includes\wp_booster\external\kint\config.default.php
•includes\wp_booster\external\kint\decorators\concise.php
•includes\wp_booster\external\kint\decorators\plain.php
•includes\wp_booster\external\kint\decorators\rich.php
•includes\wp_booster\external\kint\Kint.class.php
•includes\wp_booster\external\kint\LICENCE
•includes\wp_booster\external\kint\parsers\custom\arrayobject.php
•includes\wp_booster\external\kint\parsers\custom\classmethods.php
•includes\wp_booster\external\kint\parsers\custom\classstatics.php
•includes\wp_booster\external\kint\parsers\custom\color.php
•includes\wp_booster\external\kint\parsers\custom\json.php
•includes\wp_booster\external\kint\parsers\custom\microtime.php
•includes\wp_booster\external\kint\parsers\custom\splfileinfo.php
•includes\wp_booster\external\kint\parsers\custom\splobjectstorage.php
•includes\wp_booster\external\kint\parsers\custom\timestamp.php
•includes\wp_booster\external\kint\parsers\custom\xml.php
•includes\wp_booster\external\kint\parsers\parser.class.php
•includes\wp_booster\external\kint\README.md
•includes\wp_booster\external\kint\scripts\source.reg
•includes\wp_booster\external\kint\scripts\source.vbs
•includes\wp_booster\external\kint\view\inc\kint.js
•includes\wp_booster\external\kint\view\inc\original.css
•includes\wp_booster\external\kint\view\inc\solarized-dark.css
•includes\wp_booster\external\kint\view\inc\solarized.css
•includes\wp_booster\external\kint\view\js\_kint.js
•includes\wp_booster\external\kint\view\less\original.less
•includes\wp_booster\external\kint\view\less\solarized-dark.less
•includes\wp_booster\external\kint\view\less\solarized.less
•includes\wp_booster\external\kint\view\less\_kint.less
•includes\wp_booster\external\kint\view\trace.phtml
•includes\wp_booster\external\kint\_main.php
•includes\wp_booster\td_block_template.php
•includes\wp_booster\td_category_template.php
•includes\wp_booster\td_category_top_posts_style.php
•includes\wp_booster\td_css_inline.php
•includes\wp_booster\td_module_single_base.php
•includes\wp_booster\wp-admin\css\panel\color_picker.less
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-social.png
•includes\wp_booster\wp-admin\js\td_edit_page.js
•includes\wp_booster\wp-admin\js\td_wp_admin_color_picker.js
•includes\wp_booster\wp-admin\panel\views\td_panel_social_networks.php
•js\site.min.js
•js\tagdiv_theme.js
•js\tagdiv_theme.min.js
•parts\footer\td_footer_extra.php
•parts\footer\td_footer_template_1.php
•parts\footer\td_footer_template_2.php
•parts\footer\td_footer_template_3.php
•parts\footer\td_footer_template_4.php
•parts\footer\td_footer_template_5.php
•parts\footer\td_footer_template_6.php
•parts\footer\td_footer_template_7.php
•parts\footer\td_footer_template_8.php
•parts\footer\td_footer_template_9.php
Deleted files – 50 files
•.idea\.name
•.idea\encodings.xml
•.idea\misc.xml
•.idea\modules.xml
•.idea\Newsmag.iml
•.idea\scopes\scope_settings.xml
•.idea\vcs.xml
•.idea\workspace.xml
•includes\modules\td_module_big_grid.php
•includes\wp_booster\td_api.php
•includes\wp_booster\wp-admin\images\panel\footer-1.png
•includes\wp_booster\wp-admin\images\panel\footer-2.png
•includes\wp_booster\wp-admin\images\panel\footer-3.png
•includes\wp_booster\wp-admin\images\panel\footer-4.png
•includes\wp_booster\wp-admin\images\panel\module-1.png
•includes\wp_booster\wp-admin\images\panel\module-10.png
•includes\wp_booster\wp-admin\images\panel\module-11.png
•includes\wp_booster\wp-admin\images\panel\module-12.png
•includes\wp_booster\wp-admin\images\panel\module-13.png
•includes\wp_booster\wp-admin\images\panel\module-14.png
•includes\wp_booster\wp-admin\images\panel\module-15.png
•includes\wp_booster\wp-admin\images\panel\module-2.png
•includes\wp_booster\wp-admin\images\panel\module-3.png
•includes\wp_booster\wp-admin\images\panel\module-4.png
•includes\wp_booster\wp-admin\images\panel\module-5.png
•includes\wp_booster\wp-admin\images\panel\module-6.png
•includes\wp_booster\wp-admin\images\panel\module-7.png
•includes\wp_booster\wp-admin\images\panel\module-8.png
•includes\wp_booster\wp-admin\images\panel\module-9.png
•includes\wp_booster\wp-admin\images\panel\module-mx1.png
•includes\wp_booster\wp-admin\images\panel\module-mx2.png
•includes\wp_booster\wp-admin\images\panel\module-mx3.png
•includes\wp_booster\wp-admin\images\panel\module-search.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-0.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-1.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-2.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-3.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-4.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-5.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-6.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-7.png
•includes\wp_booster\wp-admin\images\post-templates\post-templates-icons-8.png
•includes\wp_booster\wp-admin\images\post-templates\smart-list-0.png
•includes\wp_booster\wp-admin\images\post-templates\smart-list-1.png
•includes\wp_booster\wp-admin\images\post-templates\smart-list-2.png
•includes\wp_booster\wp-admin\images\post-templates\smart-list-3.png
•includes\wp_booster\wp-admin\images\post-templates\smart-list-4.png
•js\td_site.js
•js\td_site.min.js
•parts\footer\column-1.php
—————-
New files – 105 files
•images\panel\category_templates\icon-category-1.png
•images\panel\category_templates\icon-category-2.png
•images\panel\category_templates\icon-category-top-1.png
•images\panel\category_templates\icon-category-top-2.png
•images\panel\footer_templates\icon-footer-1.png
•images\panel\footer_templates\icon-footer-2.png
•images\panel\footer_templates\icon-footer-3.png
•images\panel\footer_templates\icon-footer-4.png
•images\panel\footer_templates\icon-footer-5.png
•images\panel\footer_templates\icon-footer-6.png
•images\panel\footer_templates\icon-footer-7.png
•images\panel\footer_templates\icon-footer-8.png
•images\panel\footer_templates\icon-footer-9.png
•images\panel\modules\td_module_1.png
•images\panel\modules\td_module_10.png
•images\panel\modules\td_module_11.png
•images\panel\modules\td_module_12.png
•images\panel\modules\td_module_13.png
•images\panel\modules\td_module_14.png
•images\panel\modules\td_module_15.png
•images\panel\modules\td_module_2.png
•images\panel\modules\td_module_3.png
•images\panel\modules\td_module_4.png
•images\panel\modules\td_module_5.png
•images\panel\modules\td_module_6.png
•images\panel\modules\td_module_7.png
•images\panel\modules\td_module_8.png
•images\panel\modules\td_module_9.png
•images\panel\single_templates\single_template_1.png
•images\panel\single_templates\single_template_2.png
•images\panel\single_templates\single_template_3.png
•images\panel\single_templates\single_template_4.png
•images\panel\single_templates\single_template_5.png
•images\panel\single_templates\single_template_6.png
•images\panel\single_templates\single_template_7.png
•images\panel\single_templates\single_template_8.png
•images\panel\single_templates\single_template_default.png
•images\panel\smart_lists\td_smart_list_1.png
•images\panel\smart_lists\td_smart_list_2.png
•images\panel\smart_lists\td_smart_list_3.png
•images\panel\smart_lists\td_smart_list_4.png
•images\panel\smart_lists\td_smart_list_default.png
•includes\block_templates\td_block_template_1.php
•includes\category_templates\td_category_template_1.php
•includes\category_templates\td_category_template_2.php
•includes\category_top_posts_styles\td_category_top_posts_style_1.php
•includes\category_top_posts_styles\td_category_top_posts_style_2.php
•includes\modules\td_module_mx5.php
•includes\modules\td_module_mx6.php
•includes\modules\td_module_mx_empty.php
•includes\wp_booster\external\kint\composer.json
•includes\wp_booster\external\kint\config.default.php
•includes\wp_booster\external\kint\decorators\concise.php
•includes\wp_booster\external\kint\decorators\plain.php
•includes\wp_booster\external\kint\decorators\rich.php
•includes\wp_booster\external\kint\Kint.class.php
•includes\wp_booster\external\kint\LICENCE
•includes\wp_booster\external\kint\parsers\custom\arrayobject.php
•includes\wp_booster\external\kint\parsers\custom\classmethods.php
•includes\wp_booster\external\kint\parsers\custom\classstatics.php
•includes\wp_booster\external\kint\parsers\custom\color.php
•includes\wp_booster\external\kint\parsers\custom\json.php
•includes\wp_booster\external\kint\parsers\custom\microtime.php
•includes\wp_booster\external\kint\parsers\custom\splfileinfo.php
•includes\wp_booster\external\kint\parsers\custom\splobjectstorage.php
•includes\wp_booster\external\kint\parsers\custom\timestamp.php
•includes\wp_booster\external\kint\parsers\custom\xml.php
•includes\wp_booster\external\kint\parsers\parser.class.php
•includes\wp_booster\external\kint\README.md
•includes\wp_booster\external\kint\scripts\source.reg
•includes\wp_booster\external\kint\scripts\source.vbs
•includes\wp_booster\external\kint\view\inc\kint.js
•includes\wp_booster\external\kint\view\inc\original.css
•includes\wp_booster\external\kint\view\inc\solarized-dark.css
•includes\wp_booster\external\kint\view\inc\solarized.css
•includes\wp_booster\external\kint\view\js\_kint.js
•includes\wp_booster\external\kint\view\less\original.less
•includes\wp_booster\external\kint\view\less\solarized-dark.less
•includes\wp_booster\external\kint\view\less\solarized.less
•includes\wp_booster\external\kint\view\less\_kint.less
•includes\wp_booster\external\kint\view\trace.phtml
•includes\wp_booster\external\kint\_main.php
•includes\wp_booster\td_block_template.php
•includes\wp_booster\td_category_template.php
•includes\wp_booster\td_category_top_posts_style.php
•includes\wp_booster\td_css_inline.php
•includes\wp_booster\td_module_single_base.php
•includes\wp_booster\wp-admin\css\panel\color_picker.less
•includes\wp_booster\wp-admin\images\panel\panel-icons\ico-social.png
•includes\wp_booster\wp-admin\js\td_edit_page.js
•includes\wp_booster\wp-admin\js\td_wp_admin_color_picker.js
•includes\wp_booster\wp-admin\panel\views\td_panel_social_networks.php
•js\site.min.js
•js\tagdiv_theme.js
•js\tagdiv_theme.min.js
•parts\footer\td_footer_extra.php
•parts\footer\td_footer_template_1.php
•parts\footer\td_footer_template_2.php
•parts\footer\td_footer_template_3.php
•parts\footer\td_footer_template_4.php
•parts\footer\td_footer_template_5.php
•parts\footer\td_footer_template_6.php
•parts\footer\td_footer_template_7.php
•parts\footer\td_footer_template_8.php
•parts\footer\td_footer_template_9.php
==============================
by tagDiv 2014 🙂 | http://tagdiv.com | Our portfolio
I have tried removing the code with no effect. I have now commented it out… also no effect. Cleared my browser cache in case that was the issue. Still nothing had changed. See screen shot for my code as it is now… this is the main functions.php file in the newspaper folder (not in my child theme).
/*
to enable all the visual composer features from a child theme, declare an empty td_disable_visual_composer_features function like so in the child's functions.php:
function td_disable_visual_composer_features() {
}
*/
if (!function_exists('td_disable_visual_composer_features')) {
function td_disable_visual_composer_features() {
//if you want to enable all the features from visual composer delete this code
if (function_exists('vc_remove_element')) {
//remove unused composer elements;
//vc_remove_element("vc_separator");
// vc_remove_element("vc_text_separator");
//vc_remove_element("vc_message");
// vc_remove_element("vc_toggle");
//vc_remove_element("vc_gallery");
// vc_remove_element("vc_tour"); //wtf
// vc_remove_element("vc_accordion");
// vc_remove_element("vc_teaser_grid");
// vc_remove_element("vc_posts_slider");
// vc_remove_element("vc_posts_grid");
// vc_remove_element("vc_cta_button");
//vc_remove_element("vc_progress_bar");
//vc_remove_element("vc_wp_links");
//vc_remove_element("vc_facebook");
//remove unused styles and visual composer scripts
add_action( 'wp_enqueue_scripts', 'td_remove_visual_composer_assets', 100 );
}
//end delete code visual composer
}
}
Hi folks,
Could I make a feature request for future revisions that you wrap your class definitions for smart lists in particular with “class_exists” checks ?
I had need to make some adjustment to one of the smart list formats and its not trivial to override with a child class because the class files are loaded with require_once.
If they are wrapped to check if the class is already defined then I could simply include my versions in the child theme from functions.php without causing a PHP runtime error.
Would be super helpful, thanks !
I’ve tried both but get an error when I try to put it in the child theme (Warning: Division by zero in /home/content/xxx/html/wp-content/themes/Newspaper-child/functions.php on line 5) I also even put the js file in both locations. So now the js file is in both child and parent but the code is only in the parent functions.php file.
BTW: I’ve manually set it on recent files so if you’re looking, you’ll have to find an older post (ex. http://aftercredits.com/2014/07/howard-duck-1986/)
-
This reply was modified 11 years by
ned4spd8874.
Maybe it has something to dot with a child-theme.
In which functions.php did you add the code? In the one in folder ‘Newspaper’ or folder ‘Newspaper-child’?
Thanks again @historiek! Sorry it’s taken me so long to reply back. Been a busy holiday season and I’ve been traveling.
I’ve tried to implement this, but I still can’t get it working. I’ve tried putting it in both the child and regular theme functions.php, but neither seem to work. I’ve flushed cache, etc., but I just can’t get it working. Any ideas?
-
This reply was modified 11 years by
ned4spd8874.
Ok, so long story short, I found out it was a plugin causing the conflict; GeoDirectory.
There is a partial solution at the Geo Directory support forum.
Now, this might go outside the scope of the theme support here but, maybe the theme is keeping the solution from working.
Here goes:
I uploaded a Disqus fork and child-theme functions.php code that works in parent and child theme with GeoDirectory off. When GD is activated, the solution doesn’t work. Here it is. In theory this should work, because the original hack, which this is based on, was all in Disqus and it worked with GD and Disqus active.
Reference: http://wpgeodirectory.com/support/topic/conflict-wdisqus-comments/page/2/
Disqus code mode:
if (apply_filters( 'dsq_can_replace_filter', false )){ return false; }// NomadDevs 13-Dec-2014
functions.php code:
add_filter('dsq_can_replace_filter','dsq_can_replace_begin_hook_change',10);
function dsq_can_replace_begin_hook_change(){
global $post;
if(isset($post->post_type) && $post->post_type && in_array($post->post_type,array('places','events'))){return true;}
}
So I’m still in limbo trying to make this all work. I don’t want to use the hack, 1. because I don’t know code and 2. as soon as the plugin is updated, the hack is gone.
Any insight would be a huge help. Thank you!
Hi! I have a problem when i migrate site on the new hosting and domain:
Warning: include(/…/…/…/data/www/gtfactory.ru/wp-content/themes/Newsmag/includes/td_config.php): failed to open stream: No such file or directory in /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php on line 8
Warning: include(): Failed opening ‘/…/…/…/data/www/gtfactory.ru/wp-content/themes/Newsmag/includes/td_config.php’ for inclusion (include_path=’.:’) in /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php on line 8
Warning: include(/…/…/…/data/www/gtfactory.ru/wp-content/themes/Newsmag/includes/wp_booster/td_wp_booster_functions.php): failed to open stream: No such file or directory in /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php on line 9
Warning: include(): Failed opening ‘/…/…/…/data/www/gtfactory.ru/wp-content/themes/Newsmag/includes/wp_booster/td_wp_booster_functions.php’ for inclusion (include_path=’.:’) in /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php on line 9
Warning: Cannot modify header information – headers already sent by (output started at /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php:8) in /…/…/…/data/www/gtfactory.ru/wp-login.php on line 424
Warning: Cannot modify header information – headers already sent by (output started at /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php:8) in /…/…/…/data/www/gtfactory.ru/wp-login.php on line 437
Warning: Cannot modify header information – headers already sent by (output started at /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php:8) in /…/…/…/data/www/gtfactory.ru/wp-includes/pluggable.php on line 918
Warning: Cannot modify header information – headers already sent by (output started at /…/…/…/www/gtfactory.ru/wp-content/themes/avto-child/functions.php:8) in /…/…/…/data/www/gtfactory.ru/wp-includes/pluggable.php on line 919
Warning: Cannot modify header information – headers already sent by (output started at /…/…/…/www/gtfactory.ru/wp-content/themes/avto-child/functions.php:8) in /…/…/…/data/www/gtfactory.ru/wp-includes/pluggable.php on line 920
Warning: Cannot modify header information – headers already sent by (output started at /…/…/…/data/www/gtfactory.ru/wp-content/themes/avto-child/functions.php:8) in /…/…/…/data/www/gtfactory.ru/wp-includes/pluggable.php on line 1178
Marius, thank you for support and such a detailed screenshots!
However regarding the 2-nd question you didn’t understand me – I meant that the arrow (not a square, but the arrow therein) somehow didn’t display in my site (http://predprinimatel.kg). How to make it appear?
With regard to the rest questions – could you please explain how to do that in the Child Theme? So that it doesn’t disappear after the next theme update. Which code have I add into the functions.php file?
Thanks,
Kanybek
-
This reply was modified 11 years by
Kanybek.
Good choice 🙂
I have a little cheat sheet I keep with my mods to four files, style.css, and functions.php
and I just change those each update vs dealing with the unpredictable child theme stuff.
So (continued)
WP 4.1; Theme 1.31 Unit/Linux/Apache/CentOS
Not using child theme.
No minification.
Only changed name of theme folder and name in CSS file to sitename.
Not using megamenus.
Not using revslider.
Not using jetpack.
Disqus turned off.
HEADER.PHP HACK: (same hack we did with Newspaper where snippets worked right)
One hack to header.php was removing call to pingback since we don’t want that
REMOVED:<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
Removed the “facebook sharing fix for videos” section, not needed for our use.
Yoast WordPress SEO = on
TagDiv speed booster = on
Post settings:
Default = style 2
Featured Images – use = on
Breadcrumbs = all on
Lightbox = off
more articles box = off
ajax count = off
Related article = show by category
Sharing – all off except show top article sharing
Still showing error of not seeing the rating in preview.
TEST:
on the off chance it’s one of my customizations in functions.php
(I turn off Yoast in toolbar, hide ?version numbers and change default compression; post message for those trying to hack login/ping)
I am removing all of those …… NO CHANGE
Argh. So far only thought at this point is checking the actual content that makes up the review text itself, but looking at the Techwalls site with same issue, I don’t see any oddball characters in the summary box that might cause such an issue.
-
This reply was modified 11 years by
simchris.
Hi,
I would like to add a custom script from Isotope (url: http://isotope.metafizzy.co/). I tried to add this to functions.php as a shortcode but I’m getting a white screen. In which php file is it possible to add custom scripts for shortcodes? Or I can add this by a custom .js file? Preferably in the child theme, so I don’t need to add it after every update.
Thanks in advance.
Hi,
To do this you also need to edit the functions.php file and change the add_image_size function with the thumb size you need, like this: http://screencast.com/t/u2h99TI4P then regenerate thumbnails. Please make sure that you make a back-up of your current theme installation then make this changes to the main theme and check if this works.
If it doesn’t work please make sure that you use the child theme provided with the theme files and also make sure that you the child theme right: https://forum.tagdiv.com/child-theme-documentation-newsmag/
Hope this helps, please let me know!
Thanks