I will try to explain this as best i can. I run a site on wordpress. Its the football link in my sig. In the top left hand corner there is a place for a photo. I currently have to keep uploading a new picture every time i update the news article (which i do many times a day). Im wondering if there is some type of code that can go off the "Tags" section in the wordpress admin panel. So for instance if i put tag saying ronaldo then it will display ronaldo.jpg if i was to put a tag saying backham it would display beckham.jpg etc etc Im sure this can be done as nothing is impossible but is it easy to do as my php is pretty limited. Can anyone help? thanks tony
I dont think,it can be done.. Well,it can be done,but it will again cost a lot.. So why to waste so much money,when you can get it for a few.. Well,i can help you . PM me now...
Im sure it can be done but you will need to edit the code. Basically right before it displays the picture do a switch of if statement. if tag == "ronaldo" code for showing ronaldo picture ect.
I initially thought if tag = ronaldo then display ronaldo.jpg The problem with that is that i would need to have loads of if statements. As in 1 if statement for every player/team/manager etc it would be a big job thats why im wondering if there is a way of saying if tag = "ronaldo" then add .jpg and display tag+.jpg if that makes sense
Ya you can do that also since there is so many of them. basically it would be that you pull the tag from DB and get it into a variable (should be done already). Then for the picture use that variable. To make it even easier you can save the tag as name.jpg so theres less code to do.
i suppose the tag could be name.jpg but i would prefer it to do it the other way. So now we have established it can be done and the best way to do it does anyone know of any mods already made or any code i can use to start with that i can edit or eve better any code that is already done?
i think you can do this without any plugin.. you just need to "add custom field" = (pics path) that will pull the pics from your pics folder ... you just have to do a little php in order the wordpress to locate the file (but you will have to include this custom field everytime you post which is a part of you single post )... you just need to do a little if condition if you want to control which pics you want to use... e.q. if is_page(), is_home() etc....
i thought about the add custom field but its much easier to just do it through the tag bit as i will be getting a couple of writers to help me eventually. I want everything to be as easy as possible and as less time consuming as possible also.
In reply to your PM, im not familiar with wordpress API, i prefer coding things from scratch or SMF modding.