• Hi,

    I was wondering if someone might be able to help me and answer a question of mine. I run a wordpress site as a lead generation website. I am using the ‘?kw=’ feature on my H1 titles so that I can target for the users that land on my site via paid search..

    I was wondering if there is a way that I can develop this title further so that the targeted title follow through the site for this specific user. For example a user searches on google ‘Double Glazing In Manchester’, the user will click one of my adds and the title will show Double Glazing Prices In Manchester.

    But as soon as they click onto another pages the title goes back to normal, is there any way using cookies or something similar I can make the title targeted throughout the site for users via paid search?

    Thanks,
    Max

Viewing 15 replies - 16 through 30 (of 44 total)
  • hmmm… that in_the_loop() code should do that.. maybe change in_the_loop to is_single?

    Thread Starter maxthornton

    (@maxthornton)

    It kills the dynamic title all together of the site.. :/

    or maybe is_page, but technically, in_the_loop should do that

    is that menu a widget? or a custom menu? or what? how is it created?

    Thread Starter maxthornton

    (@maxthornton)

    is_page shows it everywhere again like it was before we put in in_the_loop..

    They created through the ‘custom menu’ option yes..

    ok, let’s try this then:

    <h1><?php global $bigtitle; $bigtitle = 1; echo get_the_title($ID); $bigtitle=0;?></h1>

    then in the function:
    global $wp_query,$bigtitle;
    and

    if ($_SESSION['kw'] && in_the_loop() && $bigtitle == 1) $title .= ' '.$_SESSION['kw'];

    Thread Starter maxthornton

    (@maxthornton)

    Ok done that, and still the same is showing :(..

    Do you think it is something that is going to be fixable? Or just one of those things that are unexplained and can’t be fixed?

    like I said, the in_the_loop() check should do it…

    I wonder..

    global $wp_query,$bigtitle,$mycount;
    
      $mycount++;

    then:

    if ($_SESSION['kw'] && in_the_loop()) $title .= ' '.$_SESSION['kw']." ".$mycount;

    check several pages, and see if the number that is after the title on the page is always the same..

    if it is, tell me the number please.

    Thread Starter maxthornton

    (@maxthornton)

    I added what you said, but no number shows after the title?

    do this:
    instead of $mycount++ put:

    $mycount = ($mycount ? 0 : $mycount++);

    see if that helps

    Thread Starter maxthornton

    (@maxthornton)

    So replace$mycount++; with $mycount = ($mycount ? 0 : $mycount++);??

    yes

    Thread Starter maxthornton

    (@maxthornton)

    Ok, done this and still nothing showing after the title.

    Could a plugin or something be knocking it out? or causing the problems?

    no, how about this:

    instead of $mycount, use $bigtitle

    $bigtitle++;
    
    if ($_SESSION['kw'] && in_the_loop()) $title .= ' '.$_SESSION['kw']." ".$bigtitle;
    Thread Starter maxthornton

    (@maxthornton)

    Nope still the same unfortunately, I’m sorry to be wasting you time on this, just your the only person I have spoken too that knows what they are talking about.. And actually fixing stuff for me ??

Viewing 15 replies - 16 through 30 (of 44 total)
  • The topic ‘Title question’ is closed to new replies.