The Community forums are being phased out in favor of a new Slack group.
Add your email address below to get an invitation to join the community slack group

Slack Signup
Newsletter Optin
Help Desk

Permalink instead of page id in views

Labels

This Discussion is public

Notifications

Hi,

You can add [post_id] in your views but the final address is [site_url]/?p=[post_id]

Add the shortcode in your function file

function get_ps_perm( $atts ){
$atts = shortcode_atts( array(
'id' => 0
), $atts, 'ps_perm' );
return get_permalink($atts['id']);
}
add_shortcode('ps_perm', 'get_ps_perm');

Then use [ps_perm id=[post_id]] in your link like

<a href="[ps_perm id=[post_id]]">your link</a>

Discussion closed.