• 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

Google Gmail API - How to login programatically?

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

Losing session data after POST from third party website

Testing subscription renewals on Stripe

Redis Command To Sort Keys

I want to display a sweetalert after the inserting of data in my database

CodeIgniter extend CI_URI undefined method

Installing Composer - Internal Error

Select option menu read from database and use it's values

Laravel 8: Array to string conversion while calling route:list

How to get an Array value inside an object in an array Php [duplicate]

How to disable widget block editor of WordPress?

How to override header set in Apache config with more specific header in a virtual host

laravel 5.6 bulk inserting json data

Laravel Factory not calling callback 'afterCreating'

About Contact Privacy policy Terms and conditions