• 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

loop through an anchor id

Batch request Google Calendar php API

The "client_reference_id" argument is not passed

I'm trying to use curl with php but getting this error:Could not resolve host: Bearer

Problem with fetching data from database in Laravel

Apply session id from request header

Json_Encode not returning html even i try to encode JSON_HEX_QUOT | JSON_HEX_TAG

GRPC installed successfully on ubuntu but php is looking for it in another folder

Yoast SEO (WordPress Plugin) - Get plugin generated data manually

WordPress Subquery returns more than 1 row on SELECT

Woocommerce redirect after add-to-cart error

Wordpress how to get the post thumbnail inside a figure tag

Converting alphabet letter to alphabet position in PHP [duplicate]

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

OAuth2 Token PHP

About Contact Privacy policy Terms and conditions