Jump to content

Could someone help me write some simple code? Would appreciate it a lot xxx :)

- - - - -

  • Please log in to reply
3 replies to this topic

#1
chloexoxo

chloexoxo

    Newbie

  • Members
  • Pip
  • 1 posts
Hey!

I have a WordPress blog and I want to be able to have it so I can display certain text to half of my vistors and some other text to the other half. So, like if say umm 100 people came to my site then 50 would see text a and 50 would see text b.

Can anyone show me how I would do something like that? I really don't know much about code, I just read something on the WordPress site about PHP and I found this place.

All help would be appreciated.

Chloe <3

xxxx




#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Do you have a blog on wordpress.com, or are you installing wordpress software on your own site? They are two completely different situations.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
RHochstenbach

RHochstenbach

    Learning Programmer

  • Members
  • PipPipPip
  • 56 posts
The actual concept is easy, count and store the amount of times you display text a. When the amount is 50 or higher, display text 2. When the amount is 100, reset to 0. But like WingedPanther said, you need to have your own hosting for storing files.

#4
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
Even better is to count visitors and

if ($visitors % 2 == 0) show 1 else show 2

this shows all texts equal amount of times...
__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users