This file contains hidden or 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
/* Draw Constructions single service template */ | |
function draw_cons_single_template_modify($single) { | |
global $post; | |
/* Checks for single template by post type */ | |
if ( $post->post_type == 'draw_cons_service' ) { | |
if ( file_exists( DRAW_CON_PL_PATH . '/single-draw_cons_service.php' ) ) { | |
return DRAW_CON_PL_PATH . '/single-draw_cons_service.php'; | |
} |
This file contains hidden or 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
// WP Query | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array( | |
'post_type' => !empty( $settings['grid_post_type'] ) ? $settings['grid_post_type'] : 'post', | |
'post_status' => 'publish', | |
'ignore_sticky_posts' => 1, | |
'posts_per_page' => !empty( $settings['post_limit'] ) ? $settings['post_limit'] : 3, | |
'order' => $postorder, | |
'paged' => $paged, |
This file contains hidden or 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 | |
namespace DrawCon; | |
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly | |
class Draw_Con_Icon_Manager{ | |
private static $instance = null; |
This file contains hidden or 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
/* | |
* Contact form list | |
* return array | |
*/ | |
function themename_contact_form_seven(){ | |
$countactform = array(); | |
$themename_forms_args = array( 'posts_per_page' => -1, 'post_type'=> 'wpcf7_contact_form' ); | |
$themename_forms = get_posts( $themename_forms_args ); | |
if( $themename_forms ){ |
This file contains hidden or 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
/* | |
* Get Post Type | |
* return array | |
*/ | |
function themename_get_post_types( $args = [] ) { | |
$post_type_args = [ | |
'show_in_nav_menus' => true, | |
]; | |
if ( ! empty( $args['post_type'] ) ) { |
This file contains hidden or 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
/* | |
* Get Taxonomy | |
* return array | |
*/ | |
function themename_get_taxonomies( $themename_texonomy = 'category' ){ | |
$terms = get_terms( array( | |
'taxonomy' => $themename_texonomy, | |
'hide_empty' => true, | |
)); | |
if ( ! empty( $terms ) && ! is_wp_error( $terms ) ){ |
This file contains hidden or 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
/* paste this code function file | |
* Elementor Templates List | |
* return array | |
*/ | |
function brenda_elementor_template() { | |
$templates = \Elementor\Plugin::instance()->templates_manager->get_source( 'local' )->get_items(); | |
$types = array(); | |
if ( empty( $templates ) ) { | |
$template_lists = [ '0' => __( 'Do not Saved Templates.', 'brenda' ) ]; | |
} else { |
NewerOlder