I have a WordPress based website.
In the structure of the site, I have created 2 custom post types:
For Cars I have 4 taxonomies: Color, Year, Model, Wheel Type
For Wheels, I have 5 taxonomies: Size, Brand, Rim form, rim color, weight
In the Wheels admin area, I want a some function code that would:
1) Create a string made up of the first character of every word for each checked taxonomy terms for a Wheel.
2) I want to add that string as a taxonomy term for Wheel Type used in Cars.
3) I want to replace the Wheels post title, with that string.
4) Then I need to attach to the new Wheel Type taxonomy, metadata that would be the full checked taxonomy terms.
Adding a new Wheel, I would insert the image and text into the description.
Then I would check the following terms in the Taxonomy boxes:
Brand: “Good Year”
Rim form: “Spoke”
Rim Color: “Silver”
In the function area of the admin panel will be an empty character box with 2 buttons: create and replace.
I would click the create button, and the empty character box would display “5GYSS7”
Then I would make any edits to the string in the character box, and click the replace button:
1) The Wheels post title would be changed to “5GYSS7” (or whatever is in the character box, if I had edited it)
2) The taxonomy “Wheel Type” would now have the term “5GYSS7” added to it
3) The taxonomy Wheel Type “5GYSS7” would have the metadata string of “5 Good Year Spoke Silver 7” added to it
Can anyone provide the code I would need to insert into the function.php file to do this?
- The topic ‘Help: Need function code for making a string to use in title and taxonomy’ is closed to new replies.