• 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

How to redirect to another page after n seconds in wordpress without using javascript?

how to get value from array in laravel

Clients authentication and user authentication with laravel

Can we define variables in `.tpl` files?

PHP how to detect if running on arm64 cpu?

Put content of wordpress page inside div

PhP how to calculate moments with variables rows

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

Laravel Factory not calling callback 'afterCreating'

Creating a config file in PHP

Need to display only array value in JSON output

Laravel You requested 1 items, but there are only 0 items available

Show only featured products in Woocommerce shop page

301 Redirect to remove query string on homepage only

How can I make a full text index of the column?

About Contact Privacy policy Terms and conditions