• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Wordpress 'post_type_link' hides permalink

phpwordpresspermalinks


PHP Snippet 1:

function append_id_string( $link, $post ) {
    $post_meta = $post->ID;
    if ( 'product' == get_post_type( $post ) ) {
        $link = $link . '#' .$post_meta;
    } 
    return $link;
}

add_filter( 'post_type_link', 'append_id_string', 1, 2 );

Related Snippets

PHP password_verify

How to get the survey List from surveygizmo API in the Postman?(Trial Version)

Mysqli multi query error

yii2 and mssql insert varbinary into model

TesseractOCR not working for Laravel

How to send image,audio or video through the WhatsApp API - PHP

Best way to scrolldown onpageload

How to make a array inside array?

Laravel 5.1 xmlHttpRequest AJAX POST TokenMismatchException

Sentry on Symfony: how to exclude `NotFoundHttpException`

Updating and Synchronizing Woocommerce Subscriptions to Custom Date

Add a custom text for a particular product on specific email notification in Woocommerce

Laravel s3 upload file with metadata using pre-signed url

How to get transaction details in notify_url page in paypal

Sync Records With Default Values in Pivot Tables, Call to undefined method syncWithPivotDefaults()

About Contact Privacy policy Terms and conditions