• 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

Add customer email and phone in "Order" column to admin orders list on Woocommerce

How to get quarter for future date using Carbon?

Handle error for duplicate entries - PHP/MySQL

How to send upload image through email

WAMP/Wordpress - cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received

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

Search for array row with specific column value and return another value from qualifying row

protect my blog content

Is it possible to change the table name in the migration file-laravel

Explode not working properly with dash

add uri parameter to Route name in laravel

How to add class name to an existing tag in php

How can I make this nested location configuration use the correct path to call a php program?

PHP Startup Unable to load dynamic library /usr/lib/php/20151012/php_mysqli.dll

Get orders by date and status woocommerce

About Contact Privacy policy Terms and conditions