• 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 programmatically find public properties of a class from inside one of it's methods

Get latest Tweets - What API

Get sum of arrays inside array

Laravel eloquent update record without loading from database

How to create a individual template for page or post in custom plugin?

Display a success custom notice after Placing an Order in WooCommerce

Insert multidimensional array to codeigniter cart

Creating command to backup MySql database in Laravel

Unable to guess the mime type as no guessers are available Laravel 5.2

renameColumn migration fails for existing column with columns does not exist error

Additional price based on cart item count in WooCommerce

Laravel Database Strict Mode

PHP function Not Working As Expected From functions.php Include File

Group rows by column and sum another column within groups [duplicate]

Get WooCommerce product variation attribute terms in admin products general box

About Contact Privacy policy Terms and conditions