PHP code to get permalink and add additional paths to it?

ChuggZilla

New member
I am trying to figure out a way to place a PHP string inside a div on a web page that will get the permalink of the post but then re-write it adding
Example:
Post permalink:

http://example.com/post-example/

Get above link and change to the following url:

http://example.com/category/stores/post-example/

This is what I am using now to get the custom field that I created so I can manually enter in the link until I get this figured out.
<?php echo get_post_meta( $post->ID, 'Key_1', true ); ?>

Any ideas?
 
Back
Top