• 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

Laravel 5.2: Unable to locate factory with name [default]

Class AppHttpControllersUserController Does Not Exist

Custom API and cunsuming in php?

Get WooCommerce product variation attribute terms in admin products general box

How to find phpcs current default standard

Log a user out of a website when they put their computer to sleep

echo language construct is discouraged. (PHP)

Yii Ajax Submit button

Redis Command To Sort Keys

How can I get new CSRF token in LARAVEL by using ajax

RabbitMQ PRECONDITION_FAILED - unknown delivery tag

Reorder attribute dropdown terms in Woocommerce single variable products

Multiply each value in array using array_map function

How to get the total hour from starting time to end time in php

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

About Contact Privacy policy Terms and conditions