post_content)) { $post_blocks = parse_blocks($post->post_content); $key = array_search('core/gallery', array_column($post_blocks, 'blockName')); $gallery_attachment_ids = $post_blocks[$key]['attrs']['ids']; }else { $gallery = get_post_gallery( $post->ID, false ); $gallery_attachment_ids = array(); if( count($gallery) and isset($gallery['ids'])) { $gallery_attachment_ids = explode ( ",", $gallery['ids'] ); } } if ( ! empty( $gallery_attachment_ids ) ){ ?>
'.esc_html__('Ikreate Themes','business-roy').'' ); } } add_action( 'businessroy_copyright', 'businessroy_footer_copyright', 5 ); /** * Breadcrumbs Section. */ if (! function_exists( 'businessroy_breadcrumbs' ) ): function businessroy_breadcrumbs(){ $breadcrumb_image = get_theme_mod('businessroy_breadcrumbs_image'); ?>
promoservice_page; if (!empty($page_id)): $service_query = new WP_Query('page_id=' . $page_id); if ( $service_query->have_posts() ): while ( $service_query->have_posts() ): $service_query->the_post(); ?>

1, 'post_type' => 'page', 'page_id' => $aboutus, 'post_status' => 'publish', ); $aboutus_query = new WP_Query($aboutus_args); if ( $aboutus_query->have_posts() ) : while ( $aboutus_query->have_posts() ) : $aboutus_query->the_post(); $about_image = get_theme_mod('businessroy_aboutus_image'); $about_col = ''; if( !empty( $about_image ) ){ $about_col = 7; }else{ $about_col = 12; } ?>

service_page; if (!empty($page_id)): $service_query = new WP_Query('page_id=' . $page_id); if ( $service_query->have_posts() ): while ( $service_query->have_posts() ): $service_query->the_post(); ?>

term_id; ?>
$businessroyportfolio_cat, 'posts_per_page' => -1 ); $query = new WP_Query($args); if($query->have_posts()): while($query->have_posts()) : $query->the_post(); $categories = get_the_category(); $category_slug = ""; $cat_slug = array(); foreach ($categories as $category) { $cat_slug[] = 'portfolio-'.$category->term_id; } $category_slug = implode(" ", $cat_slug); if(has_post_thumbnail()){ $image_url = get_template_directory_uri().'/assets/images/portfolio-small-blank.png'; $businessroyimage = wp_get_attachment_image_src(get_post_thumbnail_id(),'businessroy-medium'); $businessroyimage_large = wp_get_attachment_image_src(get_post_thumbnail_id(),'businessroy-medium'); }else{ $image_url = get_template_directory_uri().'/assets/images/portfolio-small.png'; $businessroyimage = ""; } ?>
<?php esc_attr(get_the_title()); ?>

99
counter_title ); ?>
$post_num, 'post_type' => 'post', 'tax_query' => array( array( 'taxonomy' => 'category', 'field' => 'term_id', 'terms' => $cat_id ), ), ); $blog_query = new WP_Query ($args); if ( $blog_query->have_posts() ): while ( $blog_query->have_posts() ) : $blog_query->the_post(); ?>
>
', '' ); if ( 'post' === get_post_type() ){ do_action( 'businessroy_post_meta', 10 ); } ?>
team_page; if (!empty( $page_id )): $team_query = new WP_Query('page_id=' . $page_id); if ($team_query->have_posts()): while ($team_query->have_posts()): $team_query->the_post(); ?>

    facebook ) ) : ?>
  • twitter ) ) : ?>
  • linkedin ) ) : ?>
  • instagram ) ) : ?>
show_toggles ) && $args->show_toggles ) { // Wrap the menu item link contents in a div, used for positioning. $args->before = '
'; $args->after = ''; // Add a toggle to items with children. if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $toggle_target_string = '.menu-modal .menu-item-' . $item->ID . ' > .sub-menu'; // Add the sub menu toggle. $args->after .= ''; } // Close the wrapper. $args->after .= '
'; // Add sub menu icons to the primary menu without toggles. /*} elseif ( 'primary' === $args->theme_location ) { if ( in_array( 'menu-item-has-children', $item->classes, true ) ) { $args->after = ''; } else { $args->after = ''; } }*/ return $args; } add_filter( 'nav_menu_item_args', 'businessroy_add_sub_toggles_to_main_menu', 10, 3 ); /** * Custom page walker for this theme. * * @package Ikreate Themes * @subpackage Bussiness Roy * @since Bussiness Roy 1.0 */ if ( ! class_exists( 'Bussiness_Roy_Walker_Page' ) ) { /** * CUSTOM PAGE WALKER * A custom walker for pages. */ class Bussiness_Roy_Walker_Page extends Walker_Page { /** * Outputs the beginning of the current element in the tree. * * @see Walker::start_el() * @since 2.1.0 * * @param string $output Used to append additional content. Passed by reference. * @param WP_Post $page Page data object. * @param int $depth Optional. Depth of page. Used for padding. Default 0. * @param array $args Optional. Array of arguments. Default empty array. * @param int $current_page Optional. Page ID. Default 0. */ public function start_el( &$output, $page, $depth = 0, $args = array(), $current_page = 0 ) { if ( isset( $args['item_spacing'] ) && 'preserve' === $args['item_spacing'] ) { $t = "\t"; $n = "\n"; } else { $t = ''; $n = ''; } if ( $depth ) { $indent = str_repeat( $t, $depth ); } else { $indent = ''; } $css_class = array( 'page_item', 'page-item-' . $page->ID ); if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $css_class[] = 'page_item_has_children'; } if ( ! empty( $current_page ) ) { $_current_page = get_post( $current_page ); if ( $_current_page && in_array( $page->ID, $_current_page->ancestors, true ) ) { $css_class[] = 'current_page_ancestor'; } if ( $page->ID === $current_page ) { $css_class[] = 'current_page_item'; } elseif ( $_current_page && $page->ID === $_current_page->post_parent ) { $css_class[] = 'current_page_parent'; } } elseif ( get_option( 'page_for_posts' ) === $page->ID ) { $css_class[] = 'current_page_parent'; } /** This filter is documented in wp-includes/class-walker-page.php */ $css_classes = implode( ' ', apply_filters( 'page_css_class', $css_class, $page, $depth, $args, $current_page ) ); $css_classes = $css_classes ? ' class="' . esc_attr( $css_classes ) . '"' : ''; if ( '' === $page->post_title ) { /* translators: %d: ID of a post. */ $page->post_title = sprintf( __( '#%d (no title)', 'business-roy' ), $page->ID ); } $args['link_before'] = empty( $args['link_before'] ) ? '' : $args['link_before']; $args['link_after'] = empty( $args['link_after'] ) ? '' : $args['link_after']; $atts = array(); $atts['href'] = get_permalink( $page->ID ); $atts['aria-current'] = ( $page->ID === $current_page ) ? 'page' : ''; /** This filter is documented in wp-includes/class-walker-page.php */ $atts = apply_filters( 'page_menu_link_attributes', $atts, $page, $depth, $args, $current_page ); $attributes = ''; foreach ( $atts as $attr => $value ) { if ( ! empty( $value ) ) { $value = ( 'href' === $attr ) ? esc_url( $value ) : esc_attr( $value ); $attributes .= ' ' . $attr . '="' . $value . '"'; } } $args['list_item_before'] = ''; $args['list_item_after'] = ''; // Wrap the link in a div and append a sub menu toggle. if ( isset( $args['show_toggles'] ) && true === $args['show_toggles'] ) { // Wrap the menu item link contents in a div, used for positioning. $args['list_item_before'] = '
'; $args['list_item_after'] = ''; // Add a toggle to items with children. if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $toggle_target_string = '.menu-modal .page-item-' . $page->ID . ' > ul'; // Add the sub menu toggle. $args['list_item_after'] .= ''; } // Close the wrapper. $args['list_item_after'] .= '
'; } // Add icons to menu items with children. if ( isset( $args['show_sub_menu_icons'] ) && true === $args['show_sub_menu_icons'] ) { if ( isset( $args['pages_with_children'][ $page->ID ] ) ) { $args['list_item_after'] = ''; } } $output .= $indent . sprintf( '%s%s%s%s%s', $css_classes, $args['list_item_before'], $attributes, $args['link_before'], /** This filter is documented in wp-includes/post-template.php */ apply_filters( 'the_title', $page->post_title, $page->ID ), $args['link_after'], $args['list_item_after'] ); if ( ! empty( $args['show_date'] ) ) { if ( 'modified' === $args['show_date'] ) { $time = $page->post_modified; } else { $time = $page->post_date; } $date_format = empty( $args['date_format'] ) ? '' : $args['date_format']; $output .= ' ' . mysql2date( $date_format, $time ); } } } }