• 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

Sentry + Laravel: how to log an already catched Exception?

Statement that checks whether a URL contains a particular path?

Symfony/Form add attribute based on the data

Refresh specific HTML content that retrieves data from MySQL

Sentry on Symfony: how to exclude `NotFoundHttpException`

Message: Set sys_temp_dir in your php.ini after installed composer

Elastic Beanstalk with Laravel Envoy

How to get page number on dompdf PDF when using "view"

how to use extended ASCII instead of unicode in PHP

Show date difference as "20" instead of "20 years ago"

I want a way to give path to my files which are outside of public folder in laravel

Redirect to previous page with php

WordPress Security Standards want me to escape my html, but how to do it correctly?

VB.NET WebRequest with PHP POST

codeigniter 4 running error first time with xampp

About Contact Privacy policy Terms and conditions