Timeline for WooCommerce product title formatting
Current License: CC BY-SA 4.0
15 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 10, 2020 at 23:53 | comment | added | laxus | @TonyDjukic Hi Tony, for some reason I didn't get a notification for your response, I have gone ahead with Muneebs answer, thank you for your input though on the subject | |
Oct 1, 2020 at 15:08 | comment | added | Tony Djukic | Muneeb's answer is definitely the best way to go about doing this sort of thing. I can still post my suggestion but if you've got the time and a staging site in place to get the work done, I wouldn't even bother with just styling elements in the title. What Muneeb posted is going to give you way more power and flexibility and additional options moving forward. | |
Oct 1, 2020 at 14:57 | comment | added | laxus | Hi @TonyDjukic, It just seemed faster to add a | instead of </br> when i was typing out the titles. That would be great if you could post that I would be interested to see it and its structure. I am going to test out Muneeb's answer on my staging site I just have't had any time in the last couple of weeks to play with it | |
Oct 1, 2020 at 14:54 | vote | accept | laxus | ||
Sep 24, 2020 at 14:59 | comment | added | Tony Djukic | I can post an answer for wrapping the Brand in a span tag and then adding some CSS to get the display you want. | |
Sep 24, 2020 at 14:56 | comment | added | Tony Djukic |
I don't see how adding a pipe is any more efficient than adding a <br/> tag to the title when creating a product. You're still just adding something to the title & then you're adding another function for WordPress to process when it loads a page. Just stick with <span>Brand</span> Product Name in the title & then use CSS to apply the styling you need. Personally,I 'd make the Brand a custom taxonomy & then re-work the product template to display it exactly as I want it. That then gives you opportunities to do lots of other things, like filtering the products by Brand names, etc.
|
|
Sep 17, 2020 at 15:33 | history | edited | phatskat | CC BY-SA 4.0 |
Formatted code provided in question to be more readable.
|
Sep 11, 2020 at 13:55 | vote | accept | laxus | ||
Sep 11, 2020 at 13:55 | |||||
Sep 11, 2020 at 9:57 | answer | added | MMK | timeline score: 2 | |
Sep 11, 2020 at 9:27 | comment | added | MMK | In this case you need to put pipe sign in the backend and above code in functions.php on runtime it will replace pipe with <br>.. The other way around is to use custom taxonomomies (like categories) or add brand as custom taxonomy i will put the code later... it is more efficient in a way that many brand repeat most of the time so you just need to select it. plus in front end you can create filter by brand too. | |
Sep 11, 2020 at 8:45 | comment | added | laxus | Hi there The brand name as well as product name is directly in the title currently | |
Sep 11, 2020 at 8:35 | comment | added | MMK | Hi, you are adding brand name directly in the title or using custom field or taxonomy for brand selection. | |
Sep 11, 2020 at 1:16 | review | Close votes | |||
Sep 27, 2020 at 3:07 | |||||
Sep 10, 2020 at 19:07 | review | First posts | |||
Sep 24, 2020 at 15:00 | |||||
Sep 10, 2020 at 19:02 | history | asked | laxus | CC BY-SA 4.0 |