This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$categories = get_categories(array( | |
'orderby' => 'name', | |
'parent' => 0, | |
'taxonomy' => 'faqs_category' | |
)); | |
?> | |
<?php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('restrict_manage_posts', 'dm_filter_post_type_by_taxonomy'); | |
function dm_filter_post_type_by_taxonomy() { | |
global $typenow; | |
$post_type = 'faq'; // change to your post type | |
$taxonomy = 'faqs_category'; // change to your taxonomy | |
if ($typenow == $post_type) { | |
$selected = isset($_GET[$taxonomy]) ? $_GET[$taxonomy] : ''; | |
$info_taxonomy = get_taxonomy($taxonomy); | |
wp_dropdown_categories(array( | |
'show_option_all' => __("Show All {$info_taxonomy->label}"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'init', 'create_post_type' ); | |
function create_post_type() { | |
register_post_type( 'faq', | |
array( | |
'labels' => array( | |
'name' => __( 'FAQ' ), | |
'singular_name' => __( 'FAQ' ) | |
), | |
'public' => true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Installation script for the latest WordPress on Ubuntu | |
# | |
# Author: Dewploy Dev Team | |
# Created: November 11, 2016 | |
# Last Upate: November 11, 2016 | |
##### Functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$( all_items ).each( function( index ) { | |
if( $( this ).attr( 'class' ) == 'active' ) { | |
var active_atr = $(this).closest('.tab-pane').attr('id'); | |
$('a[href="#' + active_atr + '"]').tab('show'); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function () { | |
$( all_items ).each( function( index ) { | |
if( $( this ).attr( 'class' ) == 'active' ) { | |
$('html, body').animate({ | |
scrollTop: $( this ).offset().top - 120 | |
}, 500); | |
} | |
}); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if (has_post_thumbnail( $post->ID ) ): ?> | |
<?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> | |
<div class="entry-header entry-header-background search-page-header" style="background-image: url('<?php echo $image[0]; ?>')"> | |
<div class="container"> | |
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?> | |
</div> | |
</div> | |
<?php endif; ?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CF7_to_Agile_send( $cf7 ) | |
{ | |
$submission = WPCF7_Submission::get_instance(); | |
$posted_data = $submission->get_posted_data(); | |
$email = $posted_data['your-email']; | |
$first_name = $posted_data['your-name']; | |
$contact_json = array( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Unregister Woocommerce widget and register custom widget for price filter | |
function override_woocommerce_widgets() { | |
if ( class_exists( 'WC_Widget_Price_Filter' ) ) { | |
unregister_widget( 'WC_Widget_Price_Filter' ); | |
include get_template_directory() . '/inc/custom-widgets/dewploy-class-wc-widget-price-filter.php'; | |
register_widget( 'Dewploy_WC_Widget_Price_Filter' ); | |
} | |
} | |
add_action( 'widgets_init', 'override_woocommerce_widgets', 15 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function CF7_to_MailPoet_integration(){ | |
$submission = WPCF7_Submission::get_instance(); | |
$posted_data = $submission->get_posted_data(); | |
$email = $posted_data['your-email']; | |
$my_list_id = 3; | |
$user_data = array( | |
'email' => $email, | |
); |
OlderNewer