Custom functions and tagdiv composer

Posted in: Newspaper
Post count: 111

Hi there,

I’m redesigning my existing Newspaper theme website. After I’m done I want to have someone to code some functions into my single post en category pages. I want to add a button so that people can subscribe to the specific category the post belongs too.

When I finish my custom pages with tagdiv composer and then let someone code this extra function can I still edit the template through Cloud templates after that? I imagine it stops working after someone changes the code of the page. Is there a way around this? Could I incorporate a function like this into the single post page without me having to make a different template for every single category?

Post count: 35449

Hi,

That depend if the code is set in functions, not in the file for cloud templates, then the tagDiv Composer should still work on that template, but if is edit the cloud files or composer files then is very possible that when you try to edit it to give some errors and crush.

But why not add the button using tagDiv Composer, you can not achieve what you need?

Thank you for your understanding!

Post count: 111

Hi Calin,

Thanks for your reply.

So if the code is set in functions it is possible to call a function using tagdiv composer that checks the subcategory and calls the right shortcode?

I’m not sure if I can do it using tagDiv Composer alone. Every subcategory will need a different shortcode behind the button. So I imagine if I use tagDiv Composer I would need to build a different template for each subcategory? I have a lot of them, so later if I want to change something small I have to change all the different templates. Or is there another way that’s better?

Post count: 35449

Hi,

Indeed if the shorcode behind the button need ti by different then you need to create templates for each button and this will not be very easy, I was thinking that you want to have one or two functions under button, in this way were all about one or two templates, but in this case will be better t use a child theme -> https://forum.tagdiv.com/the-child-theme-support-tutorial/ in this way you’ll not lose the changes in the theme core.

Thank you!

Post count: 111

Ok, thanks. So I make my template through the Cloud Library and when I’m done I can take the template, have it edited by someone and put it in the cild theme folder?

I imagine that if I want to edit the template later I have to take out the custom code temporarily and put it back after editing. You think that will work?

Post count: 35449

Hi,

Using cloud library I do not think that this will work, only with the default theme files, the cloud library are a very delicate files, and will crush quickly, if the code is not set well or you forget about the changes made in plugin files; also the cloud temples can not be set in default child theme, there will be nee for some custom work to the child theme files in order to work with cloud files.
What you want to achieve is quite complicate, because after you made the changes and you want to edit the cloud templates to have problems, also making an theme update can be hard, because you’ll need to recheck the compatibility.
So this can work but I can not say for sure that it will work 100%.

Thank you for your understanding!

Post count: 111

Ok, good to know.

I`ll ask if it is possible to have the functionality as a widget, because then I could add it to any page/post using the widgetised sidebar right?

Post count: 35449

Hi,

Yes, this should work without problems.

Thank you!

Post count: 111

Another question about this. I want the site to be full width. How do I achieve this without the Cloud Library? Because I want to add an additional text field in the category page template, but you said I shouldn’t edit the Cloud Library templates. I want to stetch the rows and have 1400 px content.

Post count: 35449

Hi,

If you use the code/function in s widget sidebar then you can use cloud templates with out problems and you can set the filed you need with tagDiv Composer in the category cloud template -> http://prntscr.com/ope4pj
Unfortunately in only using cloud templates you can make the theme to be full width, with out cloud template you can try with custom css, but if the code is not apply on the right elements can break the theme layout.

Thank you for your understanding!

Post count: 111

The thing is, I will have dozens of categories so I would have to make different templates for all of them using text. Would that slow things down in any way? It will be a problem when I want to change one thing though, then I have to edit all the templates.

What if I use the widgetised sidebar to add the text on the page. It won’t be a sidebar but full width content. Will that work and does it affect the speed?

Is any of these two option better then the other in your view?

Post count: 35449

Hi,

If you do not want to set that text filed in a specific place in the page, then you can use the sidebar widgets and the default category templates, in this way you’ll need to make a sidebar for each category and set the sidebar in theme panel on each/per category and is not need to use cloud templates.
Also you can set this text in the description section of category, in this way this will be individual -> http://prntscr.com/opfl1w and will show on cloud templates or default without need to create more sidebars or cloud templates for categories.

Thank you!

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