The proper path is /wp-content/plugins/theme-my-login-custom.php
.
I must admit.. I am absolutely baffled by ‘the loop’. I can’t make any sense of it.
Can I not simply edit a file to change the title Log Off to Profile?
@flynny: This is done automatically when the theme is coded properly.
Actually, I found out why it’s not working for me. I have some conditionals in regards to my header, and changing the title for “theme_my_login” ONLY works if you’re using <?php the_title(); ?>
In my case, my code was using echo get_the_title();
instead of the_title()
; and “Theme My Login” ignores the get_the_title()
function.
so if it’s not working for you, be sure you’re NOT using get_the_title()
as I was. (and for the record, that’s not something that shows my theme isn’t “coded properly.” Just the plugin doesn’t use/acknowledge the get_
thing.)
Just thought I’d pop this note in here, because I finally got it to work after getting rid of the get_
part of things.
ETA: it also has to be *after* the while(have_posts())
part of the loop. So now I have to do some configuring so my conditionals for the page title don’t get all messed up, since mine is after if(have_posts())
, so the title only gets shown once. (Not the login title, of course, but if I move the whole conditional *after* the while
part, then the title will show up in my blog for every post – and I don’t want that! 🙂 )
Actually, that is incorrect. The function the_title()
is simply just a wrapper function for get_the_title()
. The filter the_title is applied to get_the_title()
, effectively applying it to both functions.
The TML title filter uses in_the_loop()
to determine whether it is for the navigation menu or for the page title. The function in_the_loop()
is set to true after the_post()
is called.
Then something must be wrong, because I was (properly) using “get_the_title()”, and I was within the Loop (but only the “if(have_posts())” part), and the filter refused to work until I switched it to “the_title()” and moved it after the “while(have_posts()): the_post();”
I do know the_title is just a wrapper for get_the_title, but my “get_the_title” certainly didn’t work (even after being placed after “the_post();”) – I *had* to switch it to “the_title();” before it would work. Believe me, I tried not to edit my code *too* much to mess up what I was doing with other pages! 🙂
@flynny, he is correct in saying it is done automatically, but you sound like you may be somewhat new to programming. $title is a variable, it is not constant, you can only change it in that code once you have some condition stop on a piece of information you want to change in a situation you determine in a conditional structure. That is why it is called ‘the loop’, each time it loops, it fetches another post, and the information stored in $title or any of the other variable are potentially and most likely different. In each situation that $title value will be whatever it was set to in the WordPress’s GUI back end. So I think what you might have wanted to know is that you don’t have to change it there, you do it in the CMS.
I could well have misinterpreted you since there’s not a whole lot of information to go by. I hope it was helpful just the same.