Skip to content

Instantly share code, notes, and snippets.

@jayeshhpatel
jayeshhpatel / gist:cc0b17543d3d8b979e38c50684284b2c
Created September 7, 2024 06:41
WordPress : custom-post-types.php
<?php
/*-----------------------------------------------------------------------------------*/
/* Post type: | InCreativeWeb.com
/*-----------------------------------------------------------------------------------*/
// Register Authors Custom Post Type
function icw_register_job_authors_post_type() {
// Set up the labels
$labels = array(
'name' => 'authors', // Use the same name as the post type
'singular_name' => 'author', // Use the same name as the post type
@jayeshhpatel
jayeshhpatel / DataTables Server Side Processing in WordPress (functions.php)
Last active December 23, 2023 06:05
DataTables Server Side Processing in WordPress
Add the following piece of code to your functions.php file.
add_shortcode('getMembership-lists', 'ajax_membership_table_shortcode');
// WITH AJAX LOAD TABLE
function membership_datatables_scripts() {
wp_register_style('datatables_style', '//cdn.datatables.net/1.11.1/css/jquery.dataTables.min.css');
wp_enqueue_style('datatables_style');
@jayeshhpatel
jayeshhpatel / Create visual composer with param_group
Created August 12, 2021 03:59
Create visual composer with param_group
Visit : https://increativeweb.com/create-visual-composer-with-param_group
=============================
Sample 1
//Backend visual composer add-on code
vc_map(array(
'name' => 'Accordions',
'base' => 'maxima_accordion',
'category' => 'Maxima',