• 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

WooCommerce Subscriptions: Remove role on cancelled subscription

No definition found for function in vendor vscode

Send POST data via raw JSON with Postman

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

Valet, Xdebug after reboot Big Sur not working

Error converting docx to pdf using Unoconv

Transfer data between JavaScript and PHP through JSON

Why does using salted hash on python and php give me different results?

Symfony run hint kernel.secret parameter not found

dockerizing Laravel + vue

How to Install Composer Require doctrine/dbal

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

find in set in laravel ? example

Laravel views are showing from cache on one server but works fine on other server

PHP array slice from position + attempt to return fixed number of items

About Contact Privacy policy Terms and conditions