Jump to content
Sign in to follow this  
aequator

adding php code to html href

Recommended Posts

aequator

I use Platform Pro with User Photo plugin and Author Spotlight to display the author's bio and stuff next to the post. Then I use WordPress Users plugin for showing a list of all authors. post example: http://aequator.goedgehost.nl/?p=70 all authors: http://aequator.goedgehost.nl/?page_id=52 My question is a 'simple' php code question. I want the read more link to direct to the "all authors" page. To do this I have to add the authorID to the following URL: http://aequator.goedgehost.nl/?page_id=52&uid=19 How do I add the authorID to the URL? I'm editing the following line in the plugin: code-php.jpg (I've uploaded the code as an image because the forum screws up the format)

Share this post


Link to post
Share on other sites
cmunns

If you want the read more link to go to the main authors page then wouldn't you leave out the author ID so it doesn't specify? That part of your question is confusing me.

Share this post


Link to post
Share on other sites
aequator

You're right. But I don't want it to go to the main authors page. I do want it to go the the page of the "WordPress Users plugin" /?page_id=52&uid=19 instead of the normal /?author=19.

Share this post


Link to post
Share on other sites
bryan-hadaway

Forwarding to developers. Thanks, Bryan

Share this post


Link to post
Share on other sites
cmunns

Lars I'm sorry but I still don't follow the page you are trying to get to `http://aequator.goedgehost.nl/?page_id=52&uid=19` does not appear to be the "All Authors" page it is only one author. Anyway if you want to add the author URL to the href then wouldn't you just add 19 to the end of the href...what is the problem you have when you do this?

Share this post


Link to post
Share on other sites
aequator

Hi Cmunns, To explain it more clearly: next to every post, the author is shown. (http://aequator.goedgehost.nl/?p=70) When someone wants to know more about this author, he can click on "read more" which would normally redirect him to the authors page, with a specific authorID. He would then see the information page of this specific author (identified by the authorID). I want to change this, because I use the "Wordpress users plugin". This plugin shows a nice overview on http://aequator.goedgehost.nl/?page_id=52, with the possibility to click to a specific author to show more info. Now, what I want to do is to change the link from the read more tag next to the post to the direct page that uses the plugin (?page_id=52), and give it the authorID so it automatically shows the page of the author that wrote the article. My specific question is related to the code below. How can I 'feed' a variable in php to add this authorID to the link ?page_id=52 ? http://aequator.goedgehost.nl/wp-content/uploads/2010/12/code-php.jpg I hope this is more clear. Thanks - Lars

Share this post


Link to post
Share on other sites
bryan-hadaway

Forwarding again for a refresher... Thanks, Bryan

Share this post


Link to post
Share on other sites
aequator

That's not an answer to my question. I know what to do but just not how to do that. So, how do I

add the code to catch the author ID at the end of the link.
?

Share this post


Link to post
Share on other sites
cmunns

Okay so we know what it's supposed to look like, but what are you starting with or how does it look right now?

Share this post


Link to post
Share on other sites
aequator

Now I'm doing this:

echo '<div id="author_posts_link">'.$options['moretext'].'</div>';
..but still no result. It links to http://aequator.goedgehost.nl/?page_id=52&uid=.$author_posts_link.'>http://aequator.goedgehost.nl/?page_id=52&uid=.$author_posts_link. which is almost what I want to achieve. So how do I add this $author_posts_link to http://aequator.goedgehost.nl/?page_id=52&uid=

Share this post


Link to post
Share on other sites
aequator

Second time I answered my own problem:

if(isset($_GET['author_name'])) {
	$curauth = get_userdatabylogin(get_the_author_login());
	} else {
	$curauth = get_userdata(intval($author));
	}
	
	echo ???
	
	ID.??™??? title=???meer berichten..???>??™.$options['moretext'].??™
	???;
and
echo ???.getSnippet(get_the_author_description(),$options["charlimit"],?????¦???).??™ ID.??™??? title=???lees biografie???>??™.$options["readfulltext"].??™???;

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×