• 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

Attempted to call an undefined method named "get" of class "MailController"

PHPUnit 7: Failed asserting that exception of type InvalidArgumentException is thrown

dockerizing Laravel + vue

How to remove index.php and index from the URL using htaccess | PHP

Target Laravelista is not instantiable

Laravel Get Days In Month From Month Number?

Open a popup box after receiving result from ajax

Set quantity minimum, maximum and step at product level in Woocommerce

Read users and passwords from a txt file

(Cache::lock()) -> get() -- Under what conditions does it return false?

Prestashop webservice API creating cart rules

laravel automatically deletes server.php on php artisan serve

How to Display Data in Yajra Datatables Laravel 7?

Post Form Data To phpmyadmin Database

Lexik JWT authentication problem "Invalid credentials"

About Contact Privacy policy Terms and conditions