Modify single.php

Posted in: Newspaper
Post count: 71

I have this requirement: I have to insert an html block in the superior part of each article (above the title this is the code: <?php include(‘boxbooking.php’); ?>) before the update I modified the single.php and single_template_5.php file and it worked, now I modify my file but it doesn’t show me anything. Am I modifying the wrong file?
thanks

Post count: 18283

Hello !

If you are using the child theme this option will not work due to our new update of the core as you can see here: https://tagdiv.com/updating-the-core-of-tagdiv-themes/

Now you can be able to edit your page using a single post template from cloud library and there you can add raw html elements in order to insert your shortcodes: https://tagdiv.com/customize-articles-with-single-post-templates/

I hope this was helpfull !

Thank you !

Post count: 71

Hi, Thanks for the reply.
I tried to use Cloud Library but I saw that I can’t add an html block nor use the sidebar (Newspaper default)

I simply need to insert this code <? Php include (‘boxbooking.php’); ?> I can try and not use the child theme,but in which file should I enter the code to see it in all the articles?

Thanks for the support

Post count: 71

I tried to set the default theme (no child) I modified the single.php file but I don’t see any changes

Post count: 18283

Hello !

You can add RAW HTML using our RAW HTML to your single post template using the RAW HTML element and also you can add the Widget Sidebar as you can see in this photo: https://www.screencast.com/t/J2ojV2r3UoY

I hope this was more helpfull !

Thank you !

Post count: 71

Of course for the pages I did so.
But my problem is the articles how do I add a line with html code in all the articles? Could you show me?
Thanks for support

Post count: 18283

Hello !

Sorry for missleading you !

The easiest way for you right now will be to paste your code directly into the single template from the theme wich can be found here: https://www.screencast.com/t/ZJw8nXiU It is in the td Composer plugin.

I hope this was helpfull !

Thank you !

  • This reply was modified 7 years by Vlad S.
Post count: 71

Perfect, problem solved
Thank you!

Viewing 8 posts - 1 through 8 (of 8 total)
The forum ‘Newspaper’ is closed to new topics and replies.