- NewsmagChild theme support
- NewsmagWhat’s included in Newsmag theme package
- NewsmagCustom Post Type Support
- NewsmagInstall via WordPress
- NewsmagInstall via FTP
- NewsmagBreadcrumbs
This is part of the single template code, found in single_template_#.php and the corresponding loop-single-##.php in the Newspaper theme folder.
single_template_## loads loop-single-##, which has this block:
<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
and single_template_## also has, immediately after loading single-loop-##, this:
comments_template('', true);
Swapping those various lines around would do the trick.
The two robust ways to do this update are via a child theme or via the new theme API.
The theme API is a simple plugin that adds your custom templates, modules, blocks, etc. to the theme panel. I just switched most of my modifications that were in a child theme to the theme API, since child themes come with other complications and potential slowdowns.
https://forum.tagdiv.com/the-theme-api/
In this case, you would (1) create a plugin folder, (2) find the template(s) you want to make this change in and copy both the loop-single-## and single_template_## files for those templates into your plugin folder, (3) edit them to swap the order of those elements, (4) add the code to register them in the main plugin file, and (5) upload and activate the plugin in your dashboard and switch your post templates in the theme panel.
If you wanted to do this via child theme instead, it would be less work but not quite as “robust”, at least in the opinion of some.
https://forum.tagdiv.com/the-child-theme-support-tutorial/
This time you would simply make your child theme as per that tutorial, copy the single templates in there, and edit and upload them and they would invisibly replace the ones that come with the theme.
P.S. Because that comment template code loading is in single_template_##, moving it to loop-single-## might work oddly. Or it might be fine. Haven’t tried it myself.
So my company logo is huge, I want to make it fit right. But whenever I upload the image, the theme resizes it to a 272px/90px dimension which is really annoying. I want to know how change that through child-theme. This is really urgent. Please reply as soon as possible.
Thanks.
Follow the docs (link right side of page to “documentation”) on how to “upgrade” from v4 to v6 — it’s not an update, it’s an all-new theme. So, you’ll have to do the conversion script once upgraded, and you’ll have to redo some stuff since a number of things changed … no need to make child theme unless you plan to hack the templates; and even then easier to hack the main theme files anyway.
You will need to refresh your sidebar widgets — this is issue with WP when upgrading themes/changing themes. You may need to change some home page things as some modules changed.
Hi, finally I have managed to download latest version 6 of newspaper theme. My website is running on Newspaper 4.6.3 version. When I try to update theme to latest version it shows code and messed up home page and side bar is also missing. I think I have to create child theme but I dont know how to do that. But i have not made a changes in CSS that why I think it is not necessary to create child theme. Please let me know how to update to latest version. Thank You.
Hi,
I’ve created a custom category header using the TD api (so easy and great!), and I’ve come across a difficult problem for my skill level…
I don’t like showing the sibling categories when there are no children to show. I’d rather just show nothing. Hence, I wish I could comment out this block in get_sibling_categories:
// if no child categories get siblings
if (empty($categories_objects)) {
$categories_objects = get_categories(array(
'parent' => $this->current_category_obj->parent,
'hide_empty' => 0,
'number' => self::SIBLING_CATEGORY_LIMIT
));
}
But I’m not sure of the best way to override that function.
Should I:
— Overwrite the function in my plugin’s category template, since it’s a child of td_category_template?
— Try to overwrite td_category_template in a child theme?
— Edit the parent theme’s td_category_template and make the edit again on every update?
— Copy td_category_template and have my header be a child of that class instead?
— Something else?
Sorry if this is a stupid question, but if you have any ideas, please let me know!
Well, correct me if I’m wrong, but if you work on parent theme, you’ll lose all changes you have done to all files when it is not an option included in the theme, when the theme will be updated, no ? So having a child theme protects you from losing all your modifications, right ?
For me personally I find NOT using a child theme with the more advanced products like this, seems to work better since it’s not a theme on top of a framework on top of WordPress. This means if there is major core change, the child changes too, which defeats purpose.
Hi Alin,
Thanks for your answer.
2) ok 🙂
3) I will check it
1) If i use main theme, the problem does not exist anymore, but my menu too 😀
By the way, I’m not sure that all is fine in my WordPress installation of theme and child theme, cause in my child theme I just have a style.css (I did not create it like it is needed I guess ?). And so I can not find the version in a /code folder in it ?
So if anyone can explain me what to do please ? 🙂 I must admit I do not really find clear informations on this subject :/
Hi,
1. I see that you use child theme, please switch to the main theme, clear cache and see if you still have this issue. If it is fixed please make sure that you update the child theme version provided with latest version of the theme(version that you use), you can find it in the /code folder.
2. You can alter 404 template and modify it like you wish – http://screencast.com/t/s2DCUoVsnKdu
3. Please make sure that your panel settings are saved. For example if you change the module to display articles on specific category, it applies on front-end? If it doesn’t apply please check the system status for this value – http://screencast.com/t/VQxFWDGh4Gq and change it if you have access to php.ini file or if you don’t, contact your host.
Thanks!
Hi,
You can use one of the headers styles with full logo: http://screencast.com/t/IR4GHgN1WI and use a larger header logo image.
1. No, switching to the child theme without any customization added will work just like the main theme does.
2. You can find all of them in theme’s config file: http://screencast.com/t/KbzHMqyb
Thanks
Thanks Lucian
Here is a link to the site: http://goo.gl/nU1L6o
Please let us know how to enlarge the logo.
Also,
1) If using the parent theme, would any changes occur if we switched to the child theme?
2) Can you provide the meta keys for the post style?
Thanks again
Hello,
My clients are assigned the ‘editor’ role. I do not want them to make changes to the ‘post settings’ in each post.
Can I restrict this somehow within the theme? (I’m using a child theme version).
Thanks!
Craig
Hi,
Please make sure that your child theme version is the same like the main theme and acctivate it. You have to see what module you need to be overwritten by the child theme, and copy it the the child theme under a similar directory structure (…/child_theme_name/includes/modules/), like it is specified in the documentation.
Thanks!
Ok, here is the thing:
I followed your recommendations along with your print screens step by step. Didn’t work. All I did was to copy the respective files and place them on the root of the child-theme and edit them. I placed the
<div class="td-excerpt">
<?php echo $this->get_excerpt();?>
</div>
Inside of files I should edit and it did not work. I then placed the <?php echo $this->get_excerpt();?> inside of <div class="item-details"></div> and did not work neither. Here’s the funny part: despite that I have the child theme activated, the code does not appear anywhere on my Firefox inspector when I inspect it…
After testing on the parent theme files, the cnages are visible. So, I decided to create the same folder structure on the child theme and upload the respective files onto those folders. Still not working…
Any guess of what might be the cause to this problem?
-
This reply was modified 11 years by
jonybigude.
-
This reply was modified 11 years by
jonybigude.
Hi Emil G,
Thank You for the reply, i am using child theme, i want to edit the existing post type, as i can’t afford a new custom post type, url structure will be disturbed. Do guide me which template file i have to edit for the single post.
Kind Regards,
SJlabar
RESOLVED … after inserting code to functions.php, you have to visit front page to get the right list above.
This should be clearified in instructions. For example I am using custom functions plugin, becouse I don’t wanna edit theme files, and I just dont like to use child themes. 🙂
Hi,
Yes, you can doit via child-theme, check the documentation here – https://forum.tagdiv.com/the-child-theme-support-tutorial/
Thank you!
Hi!
Sorry for the late answer. I believe the best way to do this is via the child theme? In order to do that I will have to place the edited file(s) on the child theme folder with the same folder strucure, right?
Hi
Thanks Chris!
If you plan to customize theme’s code then it is recommended to use the child theme and make the necessary adjustments there, you have a guide on how to do that here: https://forum.tagdiv.com/child-theme-documentation-newsmag/
Using a child theme is recommended but given the fact that we are constantly looking to improve pour products we usually release updates quite often so if we change a file in the main theme which you’ve altered in the child theme you have to take note of those changes and adjust your changes to the new version of the file so in this regard if files you change are post’s templates or headers then you could use the child theme because we don’t plan to change any posts template or headers or anything similar, usually the change occur in theme core files.
Thanks!
Hi,
Please make sure that you use the latest version of the theme and also you update the plugins that come with the theme files, you can find them in the /plugins folder. Also if you use child theme please make sure that it is the same version like the main theme. First you can switch to the main theme, clear cache and see if it works. Also please provide a link so we can inspect this.
Thanks!
Usually due to not first turning off all plugins prior to upgrade; or turning off caching first.
Remember to delete old theme when doing updates, not simply over-write.
If using a child theme, remember to check changelog to see if child files also changed and need to be updated. Same with plugin versions included with theme.
Often if you need to “recover” — via ftp or via the hosting panel, rename your plugins folder to xplugins, then login. Then rename plugin folder back, and only turn on visual composer, then other plugs to determine if one is a conflict. Don’t use speedbooster unless everything else working.
Hope that helped 🙂
Thats a drag. Even if you dont use a child theme you need to update those files or else lose your customizations.
I don’t recall any other theme where I would have to re do all the work. Wish there was an easier way to reapply the custom edits
There isn’t much point. It’s generally a dumb idea. Main reason to use one is to make “alternate” versions of a theme based on the parent.
I don’t believe in them, and stopped using them years ago. But it’s a “standard” practice with WordPress.
For our network, we edit the main files and keep track of the files and the edits; then re-apply to major theme updates as needed.
Other downside to child theme is that it’s a CSS redirect.
Others will *strongly* disagree with me, but I personally don’t use child themes for exactly the issue you just ran into. 🙂
Then again, what is the point of using child theme?
Hi
Check the change log and if the file that you’re using in child theme appear as modified you should update it, because otherwise this could cause issues, so it’s best to also update those files.
Thanks!