• 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

Why i get wrong output for html markdown?

Laravel query builder binding parameters more than once

Insert a DIV after the 6th product only once in WooCommerce category archives

browsersync doesn't work with XAMPP

woocommerce get_order_report_data to show order_item_id

Access relation of pivot table in Laravel

how to retrieve the first and last instance of a row in pdo dataset

Reorder attribute dropdown terms in Woocommerce single variable products

how to prevent float variables displaying as scientific notation when printing [duplicate]

Change the alert text on add to cart action without selected variation in Woocommerce

Why getting "Build step 'Execute shell' marked build as failure" error while creating a backup tar for files

"cannot list resources" error from WooCommerce REST API

Set quantity minimum, maximum and step at product level in Woocommerce

Get image type from base64 encoded src string

selected value from the listbox in php

About Contact Privacy policy Terms and conditions