• 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

Laravel update hasMany relationship using saveMany

Get all WooCommerce products within own plugin

Navigation idle on content download

args[max_input] woocommerce if statement confused

Backend cannot be reached after Typo3 login screen

Hide specific products from unlogged users based in product category in WooCommerce

How to use $this->session->set_userdata in codeigniter

Trying to iterate over a mongodb cursor twice - failing

Get keys from associative array [duplicate]

How can I easily switch between PHP versions on Mac OSX?

stay with the last 15 elements of an array [duplicate]

SMTP ERROR: MAIL FROM command failed: 530 5.7.0 Must issue a STARTTLS command first when using PHPMailer

Detect if PHP session exists

Warning: A non-numeric value encountered

Attempted to call an undefined method named "get" of class "MailController"

About Contact Privacy policy Terms and conditions