• 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

Symfony there are no commands defined in the "make" namespace

Show Custom Data in Woocommerce Order Details Admin Area

Currently Using CodeIgniter Framework i have an Error

SMTP "Error: DATA not accepted from server!" Opencart 2.3 on InMotionHosting

Natural ORDER in Laravel Eloquent ORM

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

Project structure for PHP

how to create html table in php

if statement inside concatenation

VB.NET WebRequest with PHP POST

How to fix 'Data has already been sent to output, unable to output PDF file' in MPDF

How to get rid of ampersand using WP Nonce URL and WP Redirect or PHP header

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

Store / Website Column in Magento 2 Admin Grid - Custom Module

Laravel 5.1 how to use {{ old('') }} helper on blade file for radio inputs

About Contact Privacy policy Terms and conditions