• m4c3w4n

    (@m4c3w4n)


    Within a post extract the title – search the users to see if $title equals a combination of someone’s user_firstname and user_lastname.

    $title

    equaling?

    $name = “$author->user_firstname $author->user_lastname”

    act on this within said post.

Viewing 3 replies - 1 through 3 (of 3 total)
  • where do you want to go with this ????

    You also need to call on the author-info with a certain get_author…. info

    Thread Starter m4c3w4n

    (@m4c3w4n)

    this would be on the default post display post – frontpage.

    I’m using a clients first and last name as the title for a post. When being displayed back on the “frontpage” of the blog I would like to compare each postings title (client first & last name) to the registered users which in the case of clients is anyone with user_level of 0 (zero).

    So I posting title equals Bob Smith that means that this post is some how related to client Bob Smith who is also a registered user with level = 0. When I see posting title Bob Smith which is an echo of $title – I want to compare $title to $name which will be “$user_firstname $user_lastname”.

    I’m not having problem calling users and snatching variables assigned to each particular user. Just in comparing $title == $name.

    Thanks for any suggestions or pointers of any sort. I’m reading through the templates now. Extra points for code assistance 🙂 these are clients of a nonprofit.

    Thread Starter m4c3w4n

    (@m4c3w4n)

    Did it as a function in template-functions-author.php with call to function in template-functions-post.php.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘best way to compare the_title to user_firstname’ is closed to new replies.