Headline / Homepage Help
I'm sure there's an easy solution for this, but as I'm not a technically-minded person, it'll probably take me hours to figure out.
I have optimizely running on https://www.thefourohfive.com/ - and all the experiments I've run so far have been great. However, I'd like to run some headline tests on my homepage, rather than just on the articles themselves and I'm having some issues.
Example: If I change the title of the first card on the page (below the main carousel) - that'll work. But as soon as we post something new, whatever is updated assumes that original title change.
I'd like it so that if I change the title of a card on the homepage, it reflects that change even if new articles (which would result in new cards) get posted to the site.
it is not so easy because your cards ( articles ) do not have an id or any unique identifier as far as i can see.
One might refer to a link within the card or something else but i qould not recommend that if you are not very familiar with jquery/html.
How about adding an id from your backend to the cards as an id, class or data-attibute? But, you will need IT-support from your team.
Which cards headline do you want to change?
If you can not get help there, please contact here.
Ok, what you need is the Link in the card, for example the link of the first card is:
Try this as a variation code:
var myArticlesLink = 'https://www.thefourohfive.com/music/article/frank-ocean-to-headline-lovebox-festival-2017-148'; var myArticlesNewHeadline="New Headline";
jQuery("article h1 > a[href='"+myArticlesLink+"']").first().html(myArticlesNewHeadline);
This changes the headline of the first card having this link attached to the cards headline. But ids would be much, much better ;-)