• 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

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

Submitting a form with ajax in Wordpress

Multiple order by in WooCommerce

How to fix this error : Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI?

How to remove Deprecated SymfonyComponentDebugDebugClassLoader?

Zig-zag scan an N x N array

Redirect to previous page with php

Comma separated list from array with "and" before last element

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

Autoloading classes in PHPUnit using Composer and autoload.php

MISSING UPDATES FOR: MEDIA Drupal 9

Store / Website Column in Magento 2 Admin Grid - Custom Module

How to retrieve Active Directory group policy maximum password age using LDAP

Currently Using CodeIgniter Framework i have an Error

"cannot list resources" error from WooCommerce REST API

About Contact Privacy policy Terms and conditions