Quantcast
Channel: WordPress.org Forums » All Posts
Viewing all articles
Browse latest Browse all 135301

undersound on "Get the user id using his name"

$
0
0

Hi there...
I'm searching since 3h for a solution.
As many others i use a custom post type named "fotogalery".
Within there is the category "Fotograf" with the list of the photographers.

Now im on the page of one of the photographers (the url is like /wordpress/fotograf/nameof-thephotographer/).
Through the Code

$term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) );
echo '<br />Term Name:'.$term->name.'<br />';

i get the term name, which is equal to the photographers name.
As example:

url: /wordpress/fotograf/ingo-mayer/
term: Ingo Mayer

Name: Ingo Mayer

Is it possible to get the ID of Ingo Mayer by his name?
Note: he is not the author of pages or posts displayed.

I need it to view the profile of the photographer through the UPME Shortcode [upme id=X]...


Viewing all articles
Browse latest Browse all 135301

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>