• 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

Implode array with array of glue strings

Respond with status code 401 on authentication failure using Laravel and Passport?

How to send image,audio or video through the WhatsApp API - PHP

Override default Auth routes in Laravel 7

SQL to convert multiple rows into a single row of variable length

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

Creating a config file in PHP

Add 2 Webcam in one page with WebcamJS

calling server using nusoap with complextype

Woocommerce redirect after add-to-cart error

Confirm Leave on External Links in Wordpress

Apply filter array/return terms

Boolean assignment operators in PHP

How to loop sql table data inside a html table

Upload a file Using PHP and JavaScript

About Contact Privacy policy Terms and conditions