• 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

Render the content of default_filter.php in Joomla front-end

Laravel Sanctum CSRF not authenticating

Reorder attribute dropdown terms in Woocommerce single variable products

How can I get a div content in php

Component install error: JInstaller: :Install: File does not exist

Combine array with same value and add other [duplicate]

Unable to run composer install

How to trim a video by 4 fragments to 4 seconds using the PHP-FFMpeg?

How to increase the PHP upload limits [duplicate]

retrieve data from database using session

Get orders by date and status woocommerce

Handle error for duplicate entries - PHP/MySQL

Webscraping Symfony/Panther: Can't get HTML

Send Outlook 2010 email using PHP

Laravel - Browser displays message again when I press back button

About Contact Privacy policy Terms and conditions