Skip to content

Instantly share code, notes, and snippets.

View anoopranawat's full-sized avatar

Anoop anoopranawat

View GitHub Profile
<?php
// Function to change the `WP News and Five Widgets Pro` post type slug
function wpnw_pro_modify_news_post_slug( $slug ){
$slug = 'news'; // Write your desired slug
return $slug;
}
add_filter( 'wpnw_pro_news_post_slug', 'wpnw_pro_modify_news_post_slug' );
@anoopranawat
anoopranawat / featured-img.php
Last active April 8, 2016 05:27
Display featured image box in a post if your theme does not support it.
@anoopranawat
anoopranawat / wpbaw-pro-blog-post-slug.php
Last active June 13, 2016 05:07
Function to change the `WP Blog and Widgets Pro` Post Type Slug
<?php
// Function to change the `WP Blog and Widgets Pro` post type slug
function wpbaw_pro_modify_news_post_slug( $slug ){
$slug = 'blog-post'; // Write your desired slug
return $slug;
}
add_filter( 'wpbaw_pro_blog_post_slug', 'wpbaw_pro_modify_news_post_slug' );
?>
@anoopranawat
anoopranawat / wphtsp-timeline-post-slug.php
Created October 17, 2016 06:39
Function to change the 'Timeline and History Slider Pro' Post type Slug
<?php
// Function to change the `Timeline and History Slider Pro` post type slug
function wphtsp_modify_timeline_post_slug( $slug ){
$slug = 'timeline_slider_slug'; // Write your desired slug
return $slug;
}
add_filter( 'wphtsp_post_slug', 'wphtsp_modify_timeline_post_slug' );
?>
@anoopranawat
anoopranawat / wp-faqp-post-slug.php
Created November 15, 2016 06:17
Function to change the 'WP FAQ Pro' Post type Slug
<?php
// Function to change the `FAQ` post type slug
function wp_faqp_modify_faq_post_slug( $slug ){
$slug = 'sp_faq'; // Write your desired slug
return $slug;
}
add_filter( 'wp_faqp_post_slug', 'wp_faqp_modify_faq_post_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' );
@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 / 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 / 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-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' );
?>