Timeline for Wrap the 2 firsts words of title with a <Span>
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 22, 2020 at 13:44 | comment | added | Stuart66 | Hello, thank you. I will try this. Gamify is an extension that helps to give point to the community website. In my case, I use it to encourage people to post content or visit my website. They have points for every content they post or when they share or visit the website. Every time they reach a special amount, their rank is upgrading and at this point, there is a popup coming inside the website telling them the newrank. | |
Apr 20, 2020 at 17:39 | comment | added | freejack | Hi, What is gamify rank? Are the titles you want to add the span inside the loop only? If so just add if( ! in_the_loop() ){ return $title; } at the top of the function. | |
Apr 20, 2020 at 12:51 | comment | added | Stuart66 | Hello. I have a new question. I noticed it was also adding the wrap in admin and also in title from gamify rank. From admin, I found the way to hide, but ti avoid it wrap ranks, how can I add information that the filter apply only when there are more than 2 words? Thank you for your help | |
Sep 11, 2019 at 21:14 | vote | accept | Stuart66 | ||
Sep 11, 2019 at 21:13 | comment | added | Stuart66 | Super! Apreciated your help! | |
Sep 11, 2019 at 20:46 | comment | added | freejack | Hi, I have updated the code to limit the function to posts only. | |
Sep 11, 2019 at 20:45 | history | edited | freejack | CC BY-SA 4.0 |
added 52 characters in body
|
Sep 11, 2019 at 17:35 | comment | added | Stuart66 | Hello. Thank you for this. It works well. But is there a way to make it apply only to post title? Not on page... Or if it's not possible to select post can i add somewhere before a condition that the text has a minimum 4 words. I tried to add this before: if( sizeof($title) > 3 ) but it's not working. | |
Sep 11, 2019 at 15:07 | history | answered | freejack | CC BY-SA 4.0 |