Rich-text Reply

Headline / Homepage Help

oliverprimus 11-29-16

Headline / Homepage Help

Hey,

 

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.

 

Help!

CouchPsycho 11-29-16
 

Re: Headline / Homepage Help

Hi,

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.

Kind regards

Michael



"the essence of the creative act is to see the familiar as strange." (anonymous)

Re: Headline / Homepage Help

I assumed that might be the case Smiley Sad
CouchPsycho 11-29-16
 

Re: Headline / Homepage Help

There is a somehow weired way, but it is not recommendable.

Which cards headline do you want to change?

If you can not get help there, please contact here.



"the essence of the creative act is to see the familiar as strange." (anonymous)

Re: Headline / Homepage Help

Any of them really - perhaps the first one to test?
CouchPsycho 11-29-16
 

Re: Headline / Homepage Help

[ Edited ]

Ok, what you need is the Link in the card, for example the link of the first card is:

 

https://www.thefourohfive.com/music/article/frank-ocean-to-headline-lovebox-festival-2017-148

 

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 ;-)

 

Kind regards

 

Michael

 

 




"the essence of the creative act is to see the familiar as strange." (anonymous)
CouchPsycho 11-29-16
 

Re: Headline / Homepage Help

I had to remove a .parent() from the script. Please take into account if you were very fast ;-)



"the essence of the creative act is to see the familiar as strange." (anonymous)

Re: Headline / Homepage Help

Ahh this is perfect, thanks so much!