Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How Can I Get the Post Name for Link ? #87

Open
GlennIM opened this issue Jul 8, 2018 · 2 comments
Open

How Can I Get the Post Name for Link ? #87

GlennIM opened this issue Jul 8, 2018 · 2 comments

Comments

@GlennIM
Copy link

GlennIM commented Jul 8, 2018

I need it to return the Post Name permalink format not the Plain format. How can I convert this to the Post name format ?

I checked the blog I created a post on and the Pernalink settings are set to "Post Name".

string postID = client.NewPost(post);
Post thepost = client.GetPost(Convert.ToInt32(postID)); // returns "http://mysite.com/?p=6175"

@kombasltd
Copy link

Did you create your post in draft mode?

@GlennIM
Copy link
Author

GlennIM commented Aug 9, 2018

Yes... creating in "Draft Mode"

If I create it in Publish mode, will it return the post name format?

Also, before I publish a post, can you tell me how to check to see if it already exists already? I don't want to post duplicate content. Can you show me a code snippet I would use to check for an existing post?

Thanks Again,
Glenn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants