Twice date in header

Posted in: Newsmag
Post count: 8

Hi,
I have a question. How can I add second date (arabic format) next to original date only in header?
Can you help me to find easy way?
URL: test website

Thank you for your advice.
Maverick10

Post count: 35449

Hi,
Unfortunately, with your theme do not have this option, to set multiple date in header. Also our theme is only displaying the date format that can be set in WordPress https://i.imgur.com/bI4y8Fk.png (indeed with our theme you can also set the date format https://i.imgur.com/O0isAYB.png).
Thank you!

Post count: 8

Thank you Calin for you answer. But I find the file: /wp-content/plugins/td-composer/legacy/Newsmag/parts/header/top-menu.php where can I add another date.
But I have 2 questions:

  • I will change plugin file and after updating my change disappear. Is any way how to apply it to child version (like in themes)?
  • How can I apply php code for arabic format to this file? I tried only copy/paste actual date.

Can you help me with this ideas?

Thank you very much

Maverick10

Post count: 35449

Hi,
Yes that is the file path to the date from top bar and yes it can be set in a child theme to keep the changes after theme update.
As for the problem to translate the date in arabic, I think that you use the code from here https://wordpress.stackexchange.com/questions/179126/translating-publish-dates-to-arabic I’m not a developer, but it should work.
Hope this will help you!
Thank you!

Post count: 8

Thank you very much Calin,
I dont know how to create plugin child in theme, because /wp-content/plugins/td-composer/legacy/Newsmag/parts/header/top-menu.php is in the plugin file, not in theme file.
Do you know how to do it?

Thanks many

Post count: 35449

Hi,
According to our guide that file should work in child theme, because the theme functions for Newspaper was moved in tagDiv Standard pack and for Newsmag was moved in tagDiv Composer https://prnt.sc/10fvlrp
Thank you!

Post count: 8

Hi Calin,
thank you for your willingness. That sounds great!

My original path:
/wp-content/plugins/td-composer/legacy/Newsmag/parts/header/top-menu.php

I create new path in theme child:
/wp-content/themes/Newsmag-child-theme/parts/header/top-menu.php

But changing code isnt work in this new file. Where did I do a mistake?

Thank you Calin for your advice.

Maverick10

Post count: 35449

Hi,,
Let see what can be the problem.
The path is set correctly, but what you need to add more files that are requesting that file, if you set all those files https://i.imgur.com/lMEGVPV.png then it should work without problems.
Let me know the results!

Post count: 8

Hi Calin – you are master! Now it works. Thank you so much.
show result

I am trying to looking for some solution, how to set the second date in arabic format.I am not programmer, I am only designer and coder that I need to write some condition when show the second date in arabic (first date will stay in current form)

You have some idea how to do it?

Thanks Calin

Post count: 35449

Hi,
To do this you need to use some custom code, for numbers you can use this one https://i.imgur.com/j3lOYJa.png unfortunately I do not know the right one for letters.
https://pastebin.com/3rFSfCwi
Hope this will help you!

Post count: 8

Hi Calin,
Your code didn’t work but I found a new one. I would like to thank you for your helping.
I appreciate it.

Maverick10

Post count: 35449

Hi, I’m glad that you manage to archived what you needed!
If there is something else relate to our theme that I can do to help, please let me know!
Have a nice weekend!

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