• 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 in Laravel run JavaScript code stored in php variable?

Laravel Route issues with Route order in web.php

Unit (real unit test) of test laravel relationship

Display a success custom notice after Placing an Order in WooCommerce

WordPress Subquery returns more than 1 row on SELECT

Autoloading classes in PHPUnit using Composer and autoload.php

Warning: A non-numeric value encountered

getting error while enter Command => php artisan route:list

how to remove %20 in the url in php

mysql slow on updates for a well optimized query

Mysqli multi query error

array_key_exists(): The first argument should be either a string or an integer

Why isn't my PHP exception working?

How to show selected value using javascript in laravel

Remove "estimated for {country}" text after tax amount in Woocommerce checkout page

About Contact Privacy policy Terms and conditions