Jump to content


Photo
- - - - -

Need to Change Title Tag

title tag the_title wp_title change replace

  • Please log in to reply
8 replies to this topic

#1 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 161 posts

Posted 21 April 2014 - 11:23 PM

I need to "swap" the current title tag in a child theme for the following:

 
<title><?php wp_title(); ?></title>

I've searched WordPress forums and on Google but haven't found anything that works.

 

Any ideas?

 

Cheers

 

Dawson



#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 16982 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 22 April 2014 - 12:47 PM

Hi,

 

You won't be able to do that in a child theme for DMS. May I ask why you want to use that, why not just use Yoast SEO or just add your own Site Title and tagline, which is used by default ?



#3 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 161 posts

Posted 22 April 2014 - 01:12 PM

Hi Danny

 

Thanks for the information.

 

I'm using WordPress SEO but wanted to swap wp_title() for the_title() for dynamic keyword insertion into meta tags for PPC landing pages (using Speed PPC plugin with Speed PPC  built ads).

 

Anyway, thanks again for letting me know.

 

Cheers

 

Dawson

 

 



#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 16982 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 23 April 2014 - 11:21 AM

That tag is for the loop only and not to be used for your sites title, so not sure why that plugin is telling you to do so.

 

http://codex.wordpre...rence/the_title



#5 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 161 posts

Posted 23 April 2014 - 11:25 PM

It's actually just supposed to allow for the replacement of meta tags (post/page title, description) on dedicated landing pages whose values are passed through the URL from PPC ads and insert keywords dynamically into title tags and meta description.

 

I think Yoast's WordPress SEO uses wp_title tag so I was thinking it wouldn't be a problem to do.

 

I've looked at the following page but can't work this out:

 

http://codex.wordpre...erence/wp_title

 

I thought maybe I could work something out with filters with the information on the page below but no luck (truncated link makes it look the same as the one above but it`s different):

 

 

I`ve got it happening for the page content, but the closest I've come to "success" with this was getting the page title value passed from the URL and inserted into the page. Not the result I was looking for (I wasn't getting the "meta" part right).

 

I've been advised that others have done it but, for whatever reason, no one seems to be willing to share (probably due to the competitiveness of the PPC world).

 

Anyway if you can shed more light on this, I'd appreciate it.



#6 Simon_P

Simon_P

    Messer

  • Administrators



  • 8388607 posts
  • LocationDevon
  • Framework Version:2.1.1
  • Country: Country Flag

Posted 24 April 2014 - 12:00 AM

DMS already uses wp_title() and allows for wp_title() filters like all good themes should. Thats why yoasts SEO works perfectly well already.

the_title() as danny already mentioned is for post titles in the loop, not page <title>

#7 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 161 posts

Posted 24 April 2014 - 01:33 AM

Thanks for the info, Simon.

 

Here are the exact instructions from the plugin:

 

 

You need also to change the title tag in you wordpress theme as shown below.

<title><?php wp_title(); ?></title>

 

Based on that, is there anything that I need to do or should it just work?

 

Cheers



#8 Danny

Danny

    Is Awesome!

  • Moderators
  • 16982 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 24 April 2014 - 12:18 PM

The title tag is already set to that in DMS, so you shouldn't need to do anything. However, I think the best thing for you to do is contact their support, as I loathe PPC. ;)



#9 dawsonbarber

dawsonbarber

    Super Member

  • Members

  • 161 posts

Posted 25 April 2014 - 04:50 AM

Thanks Danny.

 

I get the feeling you're holding back on your feelings about PPC.

 

How do you really feel?

 

:)

 

Cheers,

 

Dawson







Also tagged with one or more of these keywords: title tag, the_title, wp_title, change, replace