I need to insert next to the date, a counter of days.
Try Javascript does not work
function hbz_day_counter(year,month,day){
// Defaults to void errors.
year = typeof(year) != 'undefined' ? year : 2000;
month = typeof(month) != 'undefined' ? month : 12;
day = typeof(day) != 'undefined' ? day : 13;
var today = new Date(); //Today
var start_ts = Date.UTC(year,(month - 1),day); //Since...
document.write(Math.floor((today - start_ts)/(1000*60*60*24) )-1);
}
<script language=”javascript”>hbz_day_counter(2000,12,13)</script>
Any ideas? I need help please
Hello juodcv,
If you want to achieve what you mean, it is necessary to do some customization to loop_single which you are using.
For example, below I gave you an example for default single template. To do this, you can change loop_single.php file and add the code below, like this: http://screencast.com/t/f36AkBkbrYxp . If you use another single template you have to change the properly file, like this:
http://screencast.com/t/zgIgAJYOwroB – http://screencast.com/t/0jDtKR4qR
The result you should see here: http://screencast.com/t/lqEiPWmjlS
Hope this helps and let us know how it goes!
If is not what you mean, please provide more details.
Thank you!
Hi, sorry if I did not explain properly what I need it is to add a number of edition the website, along with the date.
http://infotercera.com/wp-content/uploads/2015/12/Captura-de-pantalla-2015-12-04-a-las-11.55.19.jpg
As in this website…
http://infotercera.com/wp-content/uploads/2015/12/Captura-de-pantalla-2015-12-04-a-las-12.01.02.jpg
Thank you very much, sorry my english
The edition number, begins to run when the site gets the line. (Is the number of days in the website).
Assuming that the site was launched the day 01/12/2015
Example of how it should be viewed on the site.
Wednesday December 2, 2015 | Number of Issue 02
Thursday December 3, 2015 | Number of Issue 03
Friday December 4, 2015 | Number of Issue 04
Saturday December 5, 2015 | Number of Issue 05
It is a counter of days, from the 01/12/2015
I hope I was clear from already thank you very much.
-
This reply was modified 10 years by
juodcv.
Hello,
Unfortunately we have no easy solution to provide and time does not allow us to provide any custom work at the moment as we are a small team and we are working hard on development, updates, fixes and support. You can maybe find a solution online for your customization or you can maybe hire a freelancer to help out o this task.
Thank you for your understanding.
Hi all!
It’s been a while since this post was posted by now I need exactly the same solution: Putting together the date and the edition number, assuming the edition number will be updating automatically on a daily base.
Unfortunately images attached are no available right now.
Could anybody help me with this?
Thanks!
Hi this solution still works for me.
In order not to modify theme files, I use the Insert PHP Code Snippet plugin (https://es-ar.wordpress.org/plugins/insert-php-code-snippet/). Which generates a shortcode to implement anywhere on the site.
Hi, it won’t let me paste the code directly here, it gives me an error.
Our system detected some kind of strange traffic from your ip. This error has been logged and if our system is damaged, we will fix it as soon as possible.
Contact email and I send it to you
greetings
Oh great, my email es info@netbios.com.ar.
Thank you so much!
