• 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

I want to store data in new index as per my key in php [duplicate]

Warning: Unknown: Failed to write session data using user defined save handler. (session.save_path: ) in Unknown on line 0

how to use extended ASCII instead of unicode in PHP

Stop caching for PHP 5.5.3 in MAMP

How to validate Envato Purchase Code in PHP

Is there an equivalent of DynamoDB on Azure as a PHP session Handler

Make certain characters of a word from string bold

how to youtube api data to print in toolset metabox using a button click before save-post

how to see if database exists with PDO [duplicate]

Performance of foreach, array_map with lambda and array_map with static function

Laravel Passport - Not able to get token string in response?

Prevent blank space in pdf pages (DomPdf)

Using PHP to connect to a remote MSSQL database

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

How to KeyBy where multiple items have the same key

About Contact Privacy policy Terms and conditions