• 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

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

How to override header set in Apache config with more specific header in a virtual host

"There is no active transaction" when refreshing database in Laravel 8.0 test

JSON Render Issue in Date Object Laravel and PHP 7.4

Symfony Error: "An exception has been thrown during the rendering of a template"

Pass a select with mysqli_fetch_row to a table

PHPExcel How to set conditional formatting to change cell background color based on cells values

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

Phpunit partial mock + proxy Entity

Extract string between first whitespace and last whitespace in php

How to redirect to another page after n seconds in wordpress without using javascript?

ldap is missing from system when installing adldap2 in laravel

Split comma separated value from table column into rows using mysql?

Display a success custom notice after Placing an Order in WooCommerce

Use Python plotly chart in PHP

About Contact Privacy policy Terms and conditions