- NewsmagChild theme support
- NewspaperChild Theme Support
- NewspaperIntroduction to CPT and ACF with Newspaper Theme
- NewsmagWhat’s included in Newsmag theme package
- NewspaperHow to Update the Newspaper Theme
- NewspaperWhat’s Included in the Newspaper Theme Package
- ApiThe Theme API
- NewspaperFlex Block Settings Guide
- NewspaperPrimary Category: Build a hierarchy for your website
- NewsmagCustom Post Type Support
- NewsmagInstall via WordPress
- NewsmagInstall via FTP
- NewsmagBreadcrumbs
- NewspaperBreadcrumbs
- NewspaperHow to Install Newspaper via FTP
- NewspaperHow to Install Newspaper via WordPress
Hi,
Unfortunately the td_module.php file cannot be overwritten via child theme, sorry! Please check the child theme documentation – https://forum.tagdiv.com/the-child-theme-support-tutorial/
Thanks!
Hi,
Please be advised that the child theme will not work anymore. Version 6 of the theme is a new theme built from scratch. the code has been changed and so the child theme will not work properly. You will have to remake your child theme and adjust it’s modifications to the new code.
Installing via FTP is the best way to do it.
Simply copy the theme and then install the plugins from this panel: http://screencast.com/t/DJmsB29SMj
Thanks.
Hi there,
I have installed soho gothic pro custom font on my website and it is not being displayed.
I found out the reason why it is not loading up, but can you please tell me how to fix it?
When page is being loaded, fonts are loaded as
@font-face {
font-family: “SohoGothic Regular”;
src: local(“SohoGothic Regular”), url(“aksharwebsolutions.com/ffm/wp-content/themes/Newspaper-child/fonts/sohogothicpro-regular.woff”) format(“woff”);
So if you notice, it is missing http:// in the URL and because of that it is not loading the right font. Can you please tell me how to fix it. My website URL is http://aksharwebsolutions.com/ffm/ and I am using this font in the menu for the trail.
Your earliest response will be greatly appreciated.
Thanks,
Arpita
Simply copying td_data_source.php into the child theme and modifying also works. This is the approach we are using, nice and simple!
I was very surprised that this theme doesn’t enable us to show/hide the author box (that appears at the bottom of single posts) by category, and that the only option the theme provides us is “all or nothing”; show/hide the author box across ALL posts in all categories. Really? May I please put in a strong feature request for this?
Meanwhile, I did research in the forums here and found some others who were similarly interested, however their desires were a little different from mine. Whereas most others want to only hide the author box for a category or two – I am the opposite, and would like to only SHOW the author box on one or two categories (the blogs, where it makes sense).
I used the theme panel to select the option to hide the author box, and then dove into the code on td_module_single_base.php and simply added
|| is_category( array( 65, 84 )) ) {
to line 705 that starts with
if (empty($hideAuthor)
So the line reads:
if (empty($hideAuthor) || is_category( array( 65, 84 )) ) {
I’ve tried placing this modified td_module_single_base.php in the (same subdirectories, etc.) in my child theme, and when that didn’t work, I tried overwriting the existing td_module_single_base.php file in the Newsmag theme itself, and it still doesn’t work.
Can anyone guide me on what I’m doing wrong or missing? Thanks so much in advance!
Hi can you give me the psd logo for the Fashion demo child theme?
Thanks.
Thanks Andrei, the team’s response fixed it for me.
For everyone else having this problem: I created a child theme using ‘One Click Child Theme’ plugin. Clearly, that was a bad idea; using the included child theme zip is the way to go 🙂
Cheers
ok, i see on internet that my code is not good,
Right?
Now my code is :
function wp_styles_reservation() {
wp_register_script('jslider', get_stylesheet_directory_uri() . '/assets/css/jslider.css');
wp_register_script('style01', get_stylesheet_directory_uri() . '/assets/css/style01.css');
wp_register_script('counter', get_stylesheet_directory_uri() . '/assets/js/counter.js');
wp_enqueue_style( 'jslider' );
wp_enqueue_style( 'style01' );
wp_enqueue_style( 'counter' );
}
add_action('wp_enqueue_scripts','wp_styles_reservation');
But it still doesn’t work.
My Stylesheet not apply on the css i use on the Page i create from “WordPress Page”.
Any idea?
Thanks in advance
Hi,
Using the Newspaper theme, I can’t seem to find a way to cleanly override, via a filter or child theme, the default featured image.
That is, if you look at this code from td_module.php it appears hardcoded. https://www.dropbox.com/s/6vk1qodffkcc3j8/Screenshot%202015-11-14%2008.58.05.png?dl=0
I just wanted to know if you guys had a best practice for this? It could be as simple as an apply_filters that passes an extra argument ($thumbType) which I’d be happy to write and send a pull request through 🙂
Let me know if I am missing something or if there’s an easy way to cleanly do this.
I say cleanly because if I update the theme in the future I will have to reupdate the code.
-Mat
Hi,
I am using Newspaper 6 Theme.
On category pages we have filter passed in query string which is post tag. So want to filter my posts according to that query string tag.
So I have changed query successfully which is effecting results of main category pages content. On loop.php modifying query with post tag make desired results. (In child theme)
But when it comes to top grid, it is hard-cord value of 5 passed there and if posts with tag are not present it displays nothing.
I found this piece of code which is calling Top grid :
<?php td_api_category_template::_helper_show_category_template() ?>
<?php td_api_category_top_posts_style::_helper_show_category_top_posts_style() ?>
And there is main function in File: /Newspaper/includes/wp_booster/td_wp_booster_functions.php
/* ----------------------------------------------------------------------------
* modify the main query for category pages
*/
add_action('pre_get_posts', 'td_modify_main_query_for_category_page');
function td_modify_main_query_for_category_page($query) {
//checking for category page and main query
if(!is_admin() and is_category() and $query->is_main_query()) {
//get the number of page where on
$paged = get_query_var('paged');
//get the filter_by
URL($_GET) variable
$filter_by = get_query_var('filter_by');
<strong> $query_tag = filter_input( INPUT_GET, 'tag', FILTER_DEFAULT );
if($query_tag)
$query->set('tag',$query_tag); /*<strong>I tried modifying query but it does not effect top posts*/</strong>
//get the limit of posts on the category page
$limit = get_option('posts_per_page');
// get the category object - with or without permalinks
if (empty($query->query_vars['cat'])) {
td_global::$current_category_obj = get_category_by_path(get_query_var('category_name'), false); // when we have permalinks, we have to get the category object like this.
} else {
td_global::$current_category_obj = get_category($query->query_vars['cat']);
}
//offset is hardcoded because of big grid
$offset = td_api_category_top_posts_style::_helper_get_posts_shown_in_the_loop();
//echo $filter_by;
switch ($filter_by) {
case 'featured':
//get the category object
$query->set('category_name', td_global::$current_category_obj->slug);
$query->set('cat', get_cat_ID(TD_FEATURED_CAT)); //add the fetured cat
break;
case 'popular':
$query->set('meta_key', td_page_views::$post_view_counter_key);
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');
break;
case 'popular7':
$query->set('meta_key', td_page_views::$post_view_counter_7_day_total);
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');
break;
case 'review_high':
$query->set('meta_key', td_review::$td_review_key);
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');
break;
case 'random_posts':
$query->set('orderby', 'rand');
break;
}//end switch
// offset + custom pagination - if we have offset, WordPress overwrites the pagination and works with offset + limit
if(empty($query->is_feed)) {
if ( ! empty( $offset ) and $paged > 1 ) {
$query->set( 'offset', $offset + ( ( $paged - 1 ) * $limit ) );
} else {
$query->set( 'offset', $offset );
}
}
}//end if main query
}
While using Grid style one:
includes/shortcodes/td_block_big_grid_1.php
POST_LIMIT is passed as 5.
So is there any way that my category posts get filter by tag for top grid as well. I tried modifying main function as mentioned above. Please see this comment in code above (I tried modifying query but it does not effect top posts)
Please suggest how that will be possible.
Screen shot attached for details of URL having query string:
At first I was importing stylesheets putting in the style.css of my child-theme, @import url (“css / nameofmystyle.css”), it works but…
I see all over the web that the method is wrong.
that I must use the function file.
So I created a css and js folder in my child theme.
in the css folder I put style01.css and style02.css
and in the js folder and I put style01.js and style02.js
I’m looked on the internet and tried many method I found, but I do not get called my css and js file I need for the static content of certain pages.
my function.php file is at the moment like this:
<?php
/* ----------------------------------------------------------------------------
Newspaper 6 Child theme - Please do not use this child theme with older versions of Newspaper Theme
What can be overwritten via the child theme:
- everything from /parts folder
- all the loops (loop.php loop-single-1.php) etc
- the rest of the theme has to be modified via the theme api:
https://forum.tagdiv.com/the-theme-api/
*/
/* ----------------------------------------------------------------------------
add the parent style + style.css from this folder
*/
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles', 1000);
function theme_enqueue_styles() {
wp_enqueue_style('td-theme', get_template_directory_uri() . '/style.css', '', '6.1c', 'all' );
wp_enqueue_style('td-theme-child', get_stylesheet_directory_uri() . '/style.css', array('td-theme'), '6.1c', 'all' );
}
Thank you in advance for your help again
Updated the plugins manually by ftp and it didn’t seem to work. Do you think reverting to my backup and then starting over would help. Last time I activated the child theme and then installed the new theme using the normal WordPress theme panel.
I’m thinking:
Revert to backup
Activate child theme
Manually load theme through ftp
Sound right?
Hello,
So I tried to apply the same pagination answer from a Newsmag thread to Newspaper in order to have the numbers removed and display only “NEXT”/”PREVIOUS”. (I realized the screenshots are actually from a Newspaper theme)
However it doesn’t work. I looked at both files in Newsmag and Newspaper (td_module_single_base.php and td_wp_booster_functions) and in both cases the code regarding pagination is exactly the same.
It works when I use this tutorial on Newsmag and have the filter removed via functions.php in the child theme but it doesn’t work for Newspaper. Somehow Newspaper is forcing numbered pagination somewhere else.
Any ideas on solving this?
Thanks!
Hi,
Please make sure you use the child theme version provided with the theme as we have changed the child theme system from version 6.3 – http://screencast.com/t/Q9Z4Lf7tihc Then check the code that you add in stylesheet file, to not have any errors. If you use CDN you will have to purge your files and also clear all cache.
I suggest to get someone to help you as this requires some time to check and unfortunately we care not available for custom services at the moment, sorry!
Thanks!
Hi
Please backup the whole current theme installation as well as the database and wp install: https://codex.wordpress.org/WordPress_Backups in case something goes wrong you can get back at the old install.
Make sure you 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/newsmag-how-to-update-the-theme/ update also the plugins that come with the theme files from the /plugins folder. If you’re using child theme deactivate it during the update process, switch to default wp theme.
If you use child theme for files customizations it’s a good practice to check update_log.txt file for each update and see what files had been modified so if those specific files are used in the child theme you will have to check your customizations to not break the functionality of the theme.
Let us know how it goes.
Thanks!
Hi
Please make sure that you updated the theme according with our documentation: https://forum.tagdiv.com/newsmag-how-to-update-the-theme/ deactivate all plugins and also you update the plugins included in theme path Newsmag-tf\plugins clear all caches and est again.
If you use child theme for files customizations it’s a good practice to check update_log.txt file for each update and see what files had been modified so if those specific files are used in the child theme you will have to check your customizations to not break the functionality of the theme.
Thanks!
After updating the Newsmag-file and the files of js_composer and td-speed-booster I get a long list of errors like the following example in the head of the page – and also in the backend:
wp booster error:
td_api_base::mark_used_on_page : a component with the ID: td_block_1 is not set.
/var/www/vhosts/domain/httpdocs/data-directory/themes/Newsmag/includes/wp_booster/td_api.php
The complete header of the page incl. the menu and backgroud-image is no more visible.
And all used blocks in the page are invalid (the tags are visible instead of the block-heads)
[td_block_text_with_title custom_title=“My Headline“ border_top=“no_border_top“] ... [/td_block_text_with_title]
In the backend I can’t see the td_blocks in the visual composer menu – the rest of the visual composer works normal.
What can I do to fix the problem.
Thanks
Ralf
Thanks Emil!
I think that will work for us. I’ll try it tomorrow and let you know how I get on.
Basically I can replace the implementation of td_data_source with our own implementation in our child theme. Love it 🙂
add_action(‘td_wp_booster_loaded’, ‘hook_td_booster_loaded’);
function hook_td_booster_loaded(){
td_api_autoload::add(‘td_data_source’, CHILD_THEME . ‘/includes/wp-booster/td_data_source.php’);
}
Hi,
It’s possible to extend those classes(td_block and td_data_source) and customize their methods (td_block::render and td_data_source->shortcode_to_args) you can look for a guide on web or check the official documentation – http://php.net/manual/en/keyword.extends.php
Use the ‘td_wp_booster_loaded’ hook – http://screencast.com/t/hbykR0wS
Look how the main files are called above the hook – http://screencast.com/t/vSDjTPiD4KK
Beside this you have to add custom new fields in the block settings panel, follow the path and modify the files which handles that area. It a complicated task, a simpler way would be to modify the theme code directly. If you still want to doit from the child theme and you don’t know how i suggest that you hire a professional developer to help you with this customization. You can find one on places like – http://studio.envato.com/
We plan to add more options in the future but i cannot provide details about it yet, we have a lot of features on the list and we have to take them one by one.
Thank you!
I recently made one of my posts sticky…but now I don’t want it to be sticky anymore, and I can’t undo it! Every time I un-tick the sticky box and save, the changes don’t register. I’ve tried setting it to private/draft/etc. but the stickiness still comes back.
Has anyone else had this issue? The post:
http://www.seattleglobalist.com/2015/11/03/seattle-incumbents-sawant-and-harrell-lead-in-early-results-initiative-122-passing/43347
The latest news page:
http://www.seattleglobalist.com/latest-stories
The home page — where it is showing up correctly (i.e. unsticky):
http://www.seattleglobalist.com/
We’re running Newspaper 4.4 w/child theme.
WordPress 4.3.1
Hi
You can check the file which have child theme support in our documentation: https://forum.tagdiv.com/the-child-theme-support-tutorial/
If you use child theme for files customizations it’s a good practice to check update_log.txt file for each update and see what files had been modified so if those specific files are used in the child theme you will have to check your customizations to not break the functionality of the theme.
Thanks!
Thank you for your reply. I am in no need for yet another plugin. Since I managed to alter code myself, I can live with that until some future update encorporate this functionality.
However I would like if possible to know what php files can be overriden through the child theme and which cannot.
For example the Newspaper->includes->wp_booster->td_block.php does not affect anything if placed inside the child theme, unfortunatelly it has to be changed inside the main theme only.
So what folders/files can we change in child theme without fear of overwites on the main theme?
Thank you
turnd out to be the childtheme causeing it not to work
Hi Emil,
Thanks for your reply. We’ve looked at solution 1…manually setting the parameters used by the render method. But the problem is that the query is created in the td_data_source->shortcode_to_args() function which takes the $atts array and creates the query. That function does not support custom taxonomies.
And as far as we can tell, its not possible to override the td_block and td_data_source files in a child theme. It would be nice if we could pass in extra query filters via $atts which td_data_source->shortcode_to_args() would then add to the generated query.
OR allow us to override td_block and td_data_source 🙂
Ok, i thinks this can not resolved my problem, i’m sorry my english is not very good, i try to explain better.
I create a new page on child theme, this page will be my home page, in this one, a put header.php and footer.php with get_header(); …. it works!!
I chose a specific header on theme panel (header 1, 2 … 12) it works too!!
but it appears, there a ads on it 728×90, just under the header menu.
I know i can disabled it on the theme panel, but if i do that, it will disables but in all pages.
And i would like to remove this ad but just on the page i built, because it’s my home page, i want to keep the ads on the other pages.
I hope you understand
Thanks