Hi! I need to add the category of the post to the "more recent" and "more visited" widgets on the right sidebar.
Take a look at: http://www.portalcorrientes.com/empresa/
You can see three post in "Nuevos Albums" that means "Newest post", you can read the post NAME and DATE, i also want to have the CATEGORY.
Please let me know wich .php file do i have to modify.
See you!
Add category in the "most recent" widget
(12 posts)
(2 voices)
-
Posted 1 year ago #
-
Hi Victorross,
the file that needs to be modified is wp-content/themes/awake/lib/functions/widgets.php.We would be happy to help you, but since that any blog post can have more than one category, the complexity and the quantity of code that needs to be added is quite a lot.
You should look for a freelance to get this functionality.
Some good places to look are freelanceswitch.com and jobs.wordpress.net.Posted 1 year ago # -
Hi Raspo! In my website i only have 1 category per each post.
And i dont understand why you say it is complexity, beacause you can read the category in the SINGLE: http://www.portalcorrientes.com/2010/11/22/revalida-danes/
And also in: http://www.portalcorrientes.com/galeria/
That is made by the php <?php the_category(', ') ?>
But i can not find where to put this "<?php the_category(', ') ?>" to get it in the widget area.
If anyone else know how to do it please let me know.
See you!Posted 1 year ago # -
Mmmh, your posts only have one category?
Ok then, replace the wp-content/themes/awake/lib/functions/widgets.php file with the one attached to this post.Let us know if this worked for you.
Posted 1 year ago # -
Hi Raspo! I think we are on the way, thanks a lot for the support,
now i am looking at the php... you write this: "<?php the_category(', ',"single", $post->ID); ?>
"
So i think this line is the ones that show the category, the only problem that i am having, is that it shows the category parents also, and not only the category that i select in the "edit post"To understand what i mean please enter: http://www.portalcorrientes.com/empresa/
The first post is: Mega Examen Pio XI
Then the category for this post is: Asociacion Academia Superior de Taekwon-do
And the category parents are: Categorias > Eventos > Asociacion .....If you take a look you will se that all the category parents are in the widget and i would like to only have the ONE I CHOOSE IN THE "EDIT POST".
Thanks for the support.
Posted 1 year ago # -
Hi Victorross,
this is exactly what I was trying to tell you before.
When using such convenient functions as the_category(); you don't have that much control over them.
In fact, there is no way to get child categories only.The best you can do is to replace:
<?php the_category(', ',"single", $post->ID); ?>
with:
<?php the_category(', ',"", $post->ID); ?>Posted 1 year ago # -
Hi Raspo! I get what i want, i dont know if there is a problem with this, but now i have the CATEGORY that i CHOOSE in the EDIT POST OPTIONS.
So i think it is done!
Thanks for the support!Posted 1 year ago # -
Hi, it is me again, last question (i hope) about this.
Now if you take a look at: http://www.portalcorrientes.com/empresa/
You will find that the widget is OK, the post name and then the category for the post is OK.
But as i need the DATE i put it in the TITLE of the post thumbnail, so when you put your mouse over the thumb you will read the date.
I am from argentina so i need it in spanish, i cant find WHERE to translate the "Sunday" to "Domingo", "Monday" to "Lunes", etc..
Please i think it is very easy for some of you that know a lot of wordpress.
Thanks you for the support!Posted 1 year ago # -
Hi Victorross,
are you using the spanish version of wordpress? http://es.wordpress.org/If so, Wordpress should be already translating the date in your language.
Posted 1 year ago # -
Hi Raspo, i think it is not very difficult to understand that i do not have the SPANISH version, the reason is because the translate are not very "cool" and also some plugins have errors because they are not in spanish version so the read is very difficult when you have both language, so that is why i always pick the ENGLISH and then i translate it myself.
Can you give me the answer about wich file do i have to modify?
Thanks!Posted 1 year ago # -
Hi Victorross,
there is no file to modify in the theme.
Things like days, months are translated by Wordpress itself.
Read here to learn how to translate wordpress in your language: http://codex.wordpress.org/Translating_WordPressBTW, there is nothing wrong in installing the spanish version of wordpress.
Posted 1 year ago # -
Ok raspo! I will install the wordpress in spanish, then i will let you know is everythings is ok.
Thanks for the support.Posted 1 year ago #
Reply
You must log in to post.













