Getting Wordpress Post Permalink without post-name

My defalut wordpress permalink structure is set to I need to generate the post permalink without the %postname% part, without changing the default permalink structure.

I need this to set Disqus Comment URL. So when Disqus Comment loads on a post with permalink, the Disqus Thread URL is set to only.

Is there a way to generate post permalink that way?

I tried <?php echo get_permalink('', 1); ?>. But that returns this, that removes example-tech-post from the URL, but instead adds %postname%.

I'm trying to get just


Use get_post_ancestors($post->ID), or dirname(get_permalink( $post->ID ))

Need Your Help

Sharepoint hosted CRUD Application? (Entity Framework?)

entity-framework sharepoint-2010

I am going to create a basic "CRUD" application that will "live" inside Sharepoint 2010. The data will be hosted on a SQL 2008 R2 Server.

How to maintain JTable cell rendering after cell edit

java swing jtable tablecellrenderer tablecelleditor

You guys were so awesome in point me in the right direction on my last question and I have sort of an extension of my original question here:

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.