lundi 30 mars 2015

Wordpress - get_permalink to return page_id instead of slug in %postname% permalink setting

So, I have wordpress site with http://ift.tt/1mXgIw6 in permalink setting.


I want to echo get_permalink(), which showing http://ift.tt/1DjBC2W result


but when I did echo get_permalink(), it's return http://ift.tt/1DjBEaQ. I know it's not an error because the permalink setting is %postname%.


I want to use it like this :

echo '<a href="'. get_permalink() .'&get_weather='. $weather .'"></a>';


to make link result like this :

<a href="http://ift.tt/1DjBEYq"></a>


instead of this result:

<a href="http://ift.tt/1DjBEYs"></a>


So, is it possible to get result of http://ift.tt/1DjBC2W while echo-ing get_permalink() with %postname% (or other permalink setting option) as the permalink setting? please explain how


Thanks.


Aucun commentaire:

Enregistrer un commentaire