• 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 hide previous markers when new markers added in google map javascript api

PHP Warning: Module already loaded in Unknown on line 0

find in set in laravel ? example

Respond with status code 401 on authentication failure using Laravel and Passport?

How to display MySQL table using php and edit it in a web browser

Apply filter array/return terms

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

how to display a view on laravel 8 and not have a 404 NOT FOUND page?

How do I Post to .txt document before form submits

Last order would be re-order in wooCommerce. How is it possible?

Applying programmatically a coupon to an Order in WooCommerce3

Laravel Route issues with Route order in web.php

How do I call a php file with axios?

Google Calendar API batch request PHP

How to make autocomplete work in foreach php loop? (vscode, intellisense)

About Contact Privacy policy Terms and conditions