• 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

PDOException SQLSTATE[HY000] [2002] No such file or directory

How to show a popup modal in codeIgniter?

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

PHP array, move keys and values to new array, but mix it up

Laravel - How to properly generate unique slugs from article titles?

301 Redirect to remove query string on homepage only

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

Applying programmatically a coupon to an Order in WooCommerce3

api response laravel doesn't show

Get WooCommerce product variation attribute terms in admin products general box

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

Split a string array into pieces

Composer Curl error 60: SSL certificate problem: unable to get local issuer certificate

PHP random string generator

Losing session data after POST from third party website

About Contact Privacy policy Terms and conditions