wordpress get_permalink
// Get post permalink (you can use it inside a wp_query loop)
<?php the_permalink(); ?>
// or
<?php $link = get_the_permalink(); ?>
// outside the loop:
<?php echo get_permalink( $post->ID ); ?>
wordpress get_permalink
// Get post permalink (you can use it inside a wp_query loop)
<?php the_permalink(); ?>
// or
<?php $link = get_the_permalink(); ?>
// outside the loop:
<?php echo get_permalink( $post->ID ); ?>
wordpress change permalink on upload
add_filter('wp_handle_upload_prefilter', 'custom_upload_filter' );
function custom_upload_filter( $file ){
$unique = rand(0,100);
$finalstr = str_replace('.', "-".$unique.".", $file['name']);
$file['name'] = $finalstr;
return $file;
}
wordpress get the short permalink
// Get shortlink (short permalink)
<?php echo wp_get_shortlink(); ?>
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us