Skip to content

Instantly share code, notes, and snippets.

View anoopranawat's full-sized avatar

Anoop anoopranawat

View GitHub Profile
@anoopranawat
anoopranawat / vgp-pro-post-args.php
Created March 19, 2018 06:15
Make Video gallery and Player Pro post type publicly visible with permalink
<?php
/* Function to modify 'Video gallery and Player Pro' Post agrs */
function wpos_vgp_modify_post_args( $post_args ) {
$post_args['public'] = true;
$post_args['rewrite'] = true;
return $post_args;
}
add_filter( 'wp_vgp_post_type_args', 'wpos_vgp_modify_post_args' );
@anoopranawat
anoopranawat / wprpsp-carousel-custom-design.php
Created February 24, 2018 06:18
Add Custom Design to WP Responsive Recent Post Slider Pro Plugin for Carousel Sllider
@anoopranawat
anoopranawat / fcasp-pro-post-args.php
Created February 19, 2018 10:53
Make WP Featured Content and Slider Pro post type publically true with permalink
<?php
/* Function to modify 'WP Featured Content and Slider Pro' Post agrs */
function wpos_fcasp_modify_post_args( $post_args ) {
$post_args['public'] = true;
$post_args['rewrite'] = true;
return $post_args;
}
add_filter( 'wp_fcasp_post_type_args', 'wpos_fcasp_modify_post_args' );
@anoopranawat
anoopranawat / pw-team-showcase-extra-social-service.php
Created January 22, 2018 13:27
PowerPack - Team Showcase Extra Social Service
<?php
/**
* Filter to add extra social service to Team Showcase
*/
function pwpc_ts_add_social_scrvices( $services_arr ) {
$services_arr['phone'] = array(
'name' => __('Phone', 'pwpc'),
'desc' => __('Enter phone number.', 'pwpc'),
'icon' => 'fa fa-phone'
@anoopranawat
anoopranawat / portfolio-custom-design.php
Last active January 22, 2018 07:48
Add Custom Design to Portfolio and Projects Plugin
<?php
/**
* Filter to add custom design in Portfolio Plugin
*/
function wpos_wp_pap_pro_slider_custom_designs( $design_arr ) {
$design_arr['custom-1'] = __('Custom Design 1', 'portfolio-and-projects'),
return $design_arr;
}
@anoopranawat
anoopranawat / wp-faqp-cat-slug.php
Created July 19, 2017 13:51
Function to change the 'WP FAQ Pro' category slug
<?php
// Function to change the `FAQ` category slug
function wp_faqp_modify_faq_cat_slug( $slug ){
$slug = 'faq_cat'; // Write your desired slug
return $slug;
}
add_filter( 'wp_faqp_cat_slug', 'wp_faqp_modify_faq_cat_slug' );
?>
@anoopranawat
anoopranawat / wp-faqp-optimizepress.php
Last active May 19, 2017 07:33
Run FAQ with Optimizepress plugin
<?php
// Action to load script for optimizepress
add_action('op_footer', 'wp_faqp_optimizepress_script');
function wp_faqp_optimizepress_script() {
// Enqueing required script
wp_enqueue_script( 'wp-faqp-public-script' );
}
?>
@anoopranawat
anoopranawat / wp-tsasp-post-slug.php
Created March 23, 2017 12:27
Function to change the 'WP Team Showcase and Slider Pro' Post type Slug
<?php
// Function to change the `FAQ` post type slug
function wp_tsasp_modify_faq_post_slug($team_slug){
$team_slug = 'team-showcase'; // Write your desired slug
return $team_slug;
}
add_filter('wp_tsasp_post_slug', 'wp_tsasp_modify_faq_post_slug');
?>
@anoopranawat
anoopranawat / wpnw-pro-news-cat-slug.php
Last active January 18, 2017 12:14
Function to change the WP News and Scrolling Widgets Pro Post Type Slug
<?php
// Function to change the `WP News and Scrolling` Widgets Pro category slug
function wpnw_pro_modify_news_cat_slug( $slug ){
$slug = 'news-category'; // Write your desired slug
return $slug;
}
add_filter( 'wpnw_pro_news_cat_slug', 'wpnw_pro_modify_news_cat_slug' );
?>
@anoopranawat
anoopranawat / wpos-theme-conflict-script.php
Last active March 14, 2017 09:35
Function resolve conflict of WPOS plugin with Brooklyn theme
<?php
// Function to dequeue script so it will not conflict with WPOS plugin
function wpos_dequeue_conflict_script() {
wp_dequeue_script( 'retinajs' );
}
add_action( 'wp_enqueue_scripts', 'wpos_dequeue_conflict_script', 25 );
// Function to enqueue dequeue script again so theme functionality will not be break
function wpos_enqueue_dequeue_script() {
wp_enqueue_script( 'retinajs' );