• 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 youtube api data to print in toolset metabox using a button click before save-post

How can I pass the list to the component variable in Laravel?

enroll_table three field fetch to payment form to create payment field in laravel 5.5

Multiple order by in WooCommerce

Woocommerce redirect after add-to-cart error

Boolean assignment operators in PHP

How do I truncate a decimal in PHP?

storagelogs/laravel.log" could not be opened in append mode: failed to open stream: Permission denied

How to render html from a @foreach loop in a textarea

How to redirect to another page after n seconds in wordpress without using javascript?

how to identify the web server name of remote host

Elastic Beanstalk with Laravel Envoy

Laravel Carbon throws error The format separator does not match

"properties should not be accessed directly" issue during WooCommerce 3.0 checkout

file_get_contents() without "Http" to access external URL [closed]

About Contact Privacy policy Terms and conditions