Blog Designer Shortcodes

Below, you’ll find a detailed guide on how to add the Blog Designer Shortcodes to your WordPress website, including their parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Blog Designer Plugin shortcodes not to show or not to work correctly.

Before starting, here is an overview of the Blog Designer Plugin and the shortcodes it provides:

Plugin Icon
Blog Designer

"Blog Designer is a WordPress plugin that empowers users to create and customize stunning blog layouts and designs, elevating your blog's aesthetics and functionality."

★★★★✩ (168) Active Installs: 20000+ Tested with: 6.2.3 PHP Version: 7.0
Included Shortcodes:
  • [fsn_blog_designer]
  • [wp_blog_designer]
  • [wp_blog_designer_ticker]

Blog Designer [fsn_blog_designer] Shortcode

The Blog Designer shortcode is a functional tool that enhances blog aesthetics. It uses the ‘fsn_blog_designer’ shortcode to output a styled blog section. The PHP function ‘bd_fsn_shortcode’ initiates this shortcode. It starts output buffering, generates a div with classes based on style parameters, and executes the ‘wp_blog_designer’ shortcode within this div. The output is then returned, adding a visually appealing blog section to your site.

Shortcode: [fsn_blog_designer]

Examples and Usage

Basic example – A fundamental usage of the ‘fsn_blog_designer’ shortcode without any additional parameters.

[fsn_blog_designer /]

PHP Function Code

In case you have difficulties debugging what causing issues with [fsn_blog_designer] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'fsn_blog_designer', array( $this, 'bd_fsn_shortcode' ) );

Shortcode PHP function:

function bd_fsn_shortcode( $atts, $content ) {
		ob_start();
		?>
		<div class="fsn-bdp <?php echo esc_html( fsn_style_params_class( $atts ) ); ?>">
		<?php echo do_shortcode( '[wp_blog_designer]' ); ?>
		</div>
		<?php
		$output = ob_get_clean();
		return $output;
	}

Code file location:

blog-designer/blog-designer/admin/class-blog-designer-lite-admin.php

Blog Designer [wp_blog_designer] Shortcode

The ‘wp_blog_designer’ shortcode is a dynamic tool that enhances the functionality of your WordPress site. It allows you to customize the appearance of your blog posts, offering a variety of templates and styles. The related PHP code facilitates the customization process. It checks if a blog design has been set, and if not, prompts the user to select a design. It also includes filters for categories, tags, and authors, allowing you to display specific posts. The shortcode also integrates pagination and load more button options, providing a smooth user experience.

Shortcode: [wp_blog_designer]

Examples and Usage

Basic example – Displaying a blog designer view using the shortcode.

[wp_blog_designer]

PHP Function Code

In case you have difficulties debugging what causing issues with [wp_blog_designer] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'wp_blog_designer', array( $this, 'bd_views' ) );

Shortcode PHP function:

function bd_views() {
		ob_start();
		self::bd_stylesheet();
		add_filter( 'excerpt_more', array( $this, 'bd_remove_continue_reading' ), 50 );
		$settings = get_option( 'wp_blog_designer_settings' );
		if ( ! isset( $settings['template_name'] ) || empty( $settings['template_name'] ) ) {
			$link_message = '';
			if ( is_user_logged_in() ) {
				$link_message = esc_html__( 'plz go to ', 'blog-designer' ) . '<a href="' . esc_url( admin_url( 'admin.php?page=designer_settings' ) ) . '" target="_blank">' . esc_html__( 'Blog Designer Panel', 'blog-designer' ) . '</a> , ' . esc_html__( 'select Blog Designs & save settings.', 'blog-designer' );
			}
			return esc_html__( "You haven't created any blog designer shortcode.", 'blog-designer' ) . ' ' . $link_message;
		}
		$theme    = $settings['template_name'];
		$author   = array();
		$cat      = array();
		$tag      = array();
		$category = '';
		if ( isset( $settings['template_category'] ) ) {
			$cat = $settings['template_category'];
		}
		if ( ! empty( $cat ) ) {
			foreach ( $cat as $cat_ojb ) :
				$category .= $cat_ojb . ',';
			endforeach;
			$cat = rtrim( $category, ',' );
		} else {
			$cat = array();
		}
		if ( isset( $settings['template_tags'] ) ) {
			$tag = $settings['template_tags'];
		}
		if ( empty( $tag ) ) {
			$tag = array();
		}
		$tax_query = array();
		if ( ! empty( $cat ) && ! empty( $tag ) ) {
			$cat       = explode( ',', $cat );
			$tax_query = array(
				'relation' => 'OR',
				array(
					'taxonomy' => 'category',
					'field'    => 'term_id',
					'terms'    => $cat,
					'operator' => 'IN',
				),
				array(
					'taxonomy' => 'post_tag',
					'field'    => 'term_id',
					'terms'    => $tag,
					'operator' => 'IN',
				),
			);
		} elseif ( ! empty( $tag ) ) {
			$tax_query = array(
				'relation' => 'AND',
				array(
					'taxonomy' => 'post_tag',
					'field'    => 'term_id',
					'terms'    => $tag,
					'operator' => 'IN',
				),
			);
		} elseif ( ! empty( $cat ) ) {
			$cat       = explode( ',', $cat );
			$tax_query = array(
				'relation' => 'AND',
				array(
					'taxonomy' => 'category',
					'field'    => 'term_id',
					'terms'    => $cat,
					'operator' => 'IN',
				),
			);
		}
		if ( isset( $settings['template_authors'] ) && '' != $settings['template_authors'] ) {
			$author = $settings['template_authors'];
			$author = implode( ',', $author );
		}
		$posts_per_page = get_option( 'posts_per_page' );
		$paged          = Blog_Designer_Lite_Admin::bd_paged();
		$order          = 'DESC';
		$orderby        = 'date';
		if ( isset( $settings['bdp_blog_order_by'] ) && '' != $settings['bdp_blog_order_by'] ) {
			$orderby = $settings['bdp_blog_order_by'];
		}
		if ( isset( $settings['bdp_blog_order'] ) && isset( $settings['bdp_blog_order_by'] ) && '' != $settings['bdp_blog_order_by'] ) {
			$order = $settings['bdp_blog_order'];
		}
		$args           = array(
			'posts_per_page' => $posts_per_page,
			'paged'          => $paged,
			'tax_query'      => $tax_query,
			'author'         => $author,
			'orderby'        => $orderby,
			'order'          => $order,
		);
		$display_sticky = get_option( 'display_sticky' );
		if ( '' != $display_sticky && 1 == $display_sticky ) {
			$args['ignore_sticky_posts'] = 1;
		}

		global $wp_query;
		$temp_query           = $wp_query;
		$loop                 = new WP_Query( $args );
		$wp_query             = $loop;
		$max_num_pages        = $wp_query->max_num_pages;
		$i                    = 1;
		$alter                = 1;
		$class                = '';
		$alter_class          = '';
		$args_kses            = Blog_Designer_Lite_Template::args_kses();
		$main_container_class = isset( $settings['main_container_class'] ) && '' != $settings['main_container_class'] ? esc_attr( $settings['main_container_class'] ) : '';
		$pagination_type      = isset( $settings['pagination_type'] ) && '' != $settings['pagination_type'] ? esc_attr( $settings['pagination_type'] ) : 'paged';
		if ( $loop->have_posts() ) {
			echo '<div class="bdp_wrapper">';
			if ( '' != $main_container_class ) {
				echo '<div class="' . esc_attr( $main_container_class ) . '">';
			}
			if ( $max_num_pages > 1 && 'load_more_btn' === $pagination_type ) {
				echo "<div class='bdp-load-more-pre'>";
			}
			if ( 'timeline' === $theme ) {
				?>
				<div class="timeline_bg_wrap">
					<div class="timeline_back clearfix">
						<?php
			}
			if ( 'boxy-clean' === $theme ) {
				?>
						<div class="blog_template boxy-clean">
							<ul>
						<?php
			}
			if ( 'glossary' === $theme ) {
				?>
								<div class="bdp_post_list glossary_cover">
									<div class="blog_template masonry bdp_glossary">
						<?php
			}
			if ( 'nicy' === $theme ) {
				?>
										<div class="bdp_post_list nicy_cover">
					<?php
			}
			if ( 'crayon_slider' === $theme || 'sallet_slider' === $theme || 'blog-carousel' === $theme ) {
				$slider_navigation         = '';
				$template_slider_scroll    = isset( $settings['template_slider_scroll'] ) ? $settings['template_slider_scroll'] : 1;
				$display_slider_navigation = isset( $settings['display_slider_navigation'] ) ? $settings['display_slider_navigation'] : 1;
				$display_slider_controls   = isset( $settings['display_slider_controls'] ) ? $settings['display_slider_controls'] : 1;
				$slider_autoplay           = isset( $settings['slider_autoplay'] ) ? $settings['slider_autoplay'] : 1;
				$slider_autoplay_intervals = isset( $settings['slider_autoplay_intervals'] ) ? $settings['slider_autoplay_intervals'] : 7000;
				$slider_speed              = isset( $settings['slider_speed'] ) ? $settings['slider_speed'] : 600;
				$template_slider_effect    = isset( $settings['template_slider_effect'] ) ? $settings['template_slider_effect'] : 'slide';
				if ( is_rtl() ) {
					$template_slider_effect = 'fade';
				}
				$slider_column = 1;
				if ( isset( $settings['template_slider_effect'] ) && 'slide' === $settings['template_slider_effect'] ) {
					$slider_column        = isset( $settings['template_slider_columns'] ) ? $settings['template_slider_columns'] : 1;
					$slider_column_ipad   = isset( $settings['template_slider_columns_ipad'] ) ? $settings['template_slider_columns_ipad'] : 1;
					$slider_column_tablet = isset( $settings['template_slider_columns_tablet'] ) ? $settings['template_slider_columns_tablet'] : 1;
					$slider_column_mobile = isset( $settings['template_slider_columns_mobile'] ) ? $settings['template_slider_columns_mobile'] : 1;
				} else {
					$slider_column        = 1;
					$slider_column_ipad   = 1;
					$slider_column_tablet = 1;
					$slider_column_mobile = 1;
				}
				$slider_arrow = isset( $settings['arrow_style_hidden'] ) ? $settings['arrow_style_hidden'] : 'arrow1';
				if ( '' == $slider_arrow ) {
					$prev = "<i class='fas fa-chevron-left'></i>";
					$next = "<i class='fas fa-chevron-right'></i>";
				} else {
					$prev = "<div class='" . $slider_arrow . "'></div>";
					$next = "<div class='" . $slider_arrow . "'></div>";
				}
				?>
				<script type="text/javascript" id="flexslider_script">
					jQuery(document).ready(function () {
						var $maxItems = 1;
						if (jQuery(window).width() > 980) {
							$maxItems = <?php echo esc_attr( $slider_column ); ?>;
						}
						if (jQuery(window).width() > 720 && jQuery(window).width() <= 980) {
							$maxItems = <?php echo esc_attr( $slider_column_ipad ); ?>;
						}
						if (jQuery(window).width() > 480 && jQuery(window).width() <= 720) {
							$maxItems = <?php echo esc_attr( $slider_column_tablet ); ?>;
						}
						if (jQuery(window).width() <= 480) {
							$maxItems = <?php echo esc_attr( $slider_column_mobile ); ?>;
						}
						jQuery('.slider_template').flexslider({
							move: <?php echo esc_attr( $template_slider_scroll ); ?>,
							animation: '<?php echo esc_attr( $template_slider_effect ); ?>',
							itemWidth:10,itemMargin:15,minItems:1,maxItems:$maxItems,
							<?php echo ( 1 == $display_slider_controls ) ? 'directionNav: true,' : 'directionNav: false,'; ?>
							<?php echo ( 1 == $display_slider_navigation ) ? 'controlNav: true,' : 'controlNav: false,'; ?>
							<?php echo ( 1 == $slider_autoplay ) ? 'slideshow: true,' : 'slideshow: false,'; ?>
							<?php echo ( 1 == $slider_autoplay ) ? 'slideshowSpeed:' . esc_attr( $slider_autoplay_intervals ) . ',' : ''; ?>
							<?php echo ( esc_attr( $slider_speed ) ) ? 'animationSpeed:' . esc_attr( $slider_speed ) . ',' : ''; ?>
							prevText: "<?php echo $prev; ?>",
							nextText: "<?php echo $next; ?>",
							rtl: 
							<?php
							if ( is_rtl() ) {
								echo 1;
							} else {
								echo 0;
							}
							?>
						});
					});
				</script>
				<div class="blog_template slider_template <?php echo esc_attr( $theme ); ?> navigation3 <?php echo esc_attr( $slider_navigation ); ?>">
					<?php if ( 'crayon_slider' == $theme && 'design2' == $settings['slider_design_type'] ) { ?>
						<ul class="slides design2">
					<?php } else { ?>
						<ul class="slides">
						<?php
					}
			}
			if ( 'media-grid' === $theme ) {
				?>
				<div class="media-grid-wrapper">
					<?php
			}
			if ( 'blog-grid-box' === $theme ) {
				?>
				<div class="blog_template blog-grid-box">
					<?php
			}
			if ( 'ticker' === $theme ) {
				$ticker_label = ( isset( $settings['ticker_label'] ) && '' != $settings['ticker_label'] ) ? $settings['ticker_label'] : esc_html__( 'Latest Blog', 'blog-designer' );
				?>
				<div class="blog-ticker-wrapper" id="blog-ticker-style-1" data-conf="{&quot;ticker_effect&quot;:&quot;fade&quot;,&quot;autoplay&quot;:&quot;true&quot;,&quot;speed&quot;:3000,&quot;font_style&quot;:&quot;normal&quot;,&quot;scroll_speed&quot;:1}">
					<div class="ticker-title">
						<div class="ticker-style-title"><?php echo esc_attr( $ticker_label ); ?></div>
						<span></span>
					</div>
					<div class="blog-ticker-controls">
						<div class="blog-ticker-arrows"><span class="blog-ticker-arrow blog-ticker-arrow-prev"></span></div>
						<div class="blog-ticker-arrows"><span class="blog-ticker-arrow blog-ticker-arrow-next"></span></div>
					</div>
					<div class="blog-tickers">
						<ul>
				<?php
			}
			while ( $loop->have_posts() ) :
				$loop->the_post();
				if ( 'classical' === $theme ) {
					$class = ' classical';
					Blog_Designer_Lite_Template::bd_classical_template( $alter_class );
				} elseif ( 'boxy-clean' === $theme ) {
					$class = ' boxy-clean';
					Blog_Designer_Lite_Template::bd_boxy_clean_template( $settings );
				} elseif ( 'crayon_slider' === $theme ) {
					$class = ' crayon_slider';
					Blog_Designer_Lite_Template::bd_crayon_slider_template( $settings );
				} elseif ( 'sallet_slider' === $theme ) {
					$class = 'sallet_slider';
					Blog_Designer_Lite_Template::bd_sallet_slider_template( $settings );
				} elseif ( 'nicy' === $theme ) {
					$class = ' nicy';
					Blog_Designer_Lite_Template::bd_nicy_template( $settings );
				} elseif ( 'glossary' === $theme ) {
					$class = ' glossary';
					Blog_Designer_Lite_Template::bd_glossary_template( $settings );
				} elseif ( 'lightbreeze' === $theme ) {
					if ( 0 == get_option( 'template_alternativebackground' ) ) {
						if ( 0 == $alter % 2 ) {
							$alter_class = ' alternative-back';
						} else {
							$alter_class = ' ';
						}
					}
					$class = ' lightbreeze';
					Blog_Designer_Lite_Template::bd_lightbreeze_template( $alter_class );
					$alter ++;
				} elseif ( 'spektrum' === $theme ) {
					$class = ' spektrum';
					Blog_Designer_Lite_Template::bd_spektrum_template();
				} elseif ( 'evolution' === $theme ) {
					if ( 0 == get_option( 'template_alternativebackground' ) ) {
						if ( 0 == $alter % 2 ) {
							$alter_class = ' alternative-back';
						} else {
							$alter_class = ' ';
						}
					}
					$class = ' evolution';
					Blog_Designer_Lite_Template::bd_evolution_template( $alter_class );
					$alter ++;
				} elseif ( 'timeline' === $theme ) {
					if ( 0 == $alter % 2 ) {
						$alter_class = ' even';
					} else {
						$alter_class = ' ';
					}
					$class = 'timeline';
					Blog_Designer_Lite_Template::bd_timeline_template( $alter_class );
					$alter ++;
				} elseif ( 'news' === $theme ) {
					if ( 0 == get_option( 'template_alternativebackground' ) ) {
						if ( 0 == $alter % 2 ) {
							$alter_class = ' alternative-back';
						} else {
							$alter_class = ' ';
						}
					}
					$class = ' news';
					Blog_Designer_Lite_Template::bd_news_template( $alter_class );
					$alter ++;
				} elseif ( 'media-grid' === $theme ) {
					$class = ' media-grid';
					Blog_Designer_Lite_Template::bd_media_grid_template( $settings );
				} elseif ( 'blog-carousel' === $theme ) {
					$class = ' blog_carousel';
					Blog_Designer_Lite_Template::bd_blog_carousel_template( $settings );
				} elseif ( 'blog-grid-box' === $theme ) {
					$class = ' blog-grid-box';
					Blog_Designer_Lite_Template::bd_blog_grid_box_template( $settings );
				} elseif ( 'ticker' === $theme ) {
					$class = ' ticker';
					Blog_Designer_Lite_Template::bd_ticker_template( $settings );
				}
				echo wp_kses( apply_filters( 'bdads_do_show_ads', '', $settings, $i, $theme, $paged ), $args_kses );
				$i++;
			endwhile;
			if ( 'timeline' === $theme ) {
				?>
											</div>
										</div>
				<?php
			}
			if ( 'glossary' === $theme ) {
				?>
									</div>
								</div>
				<?php
			}
			if ( 'nicy' === $theme ) {
				?>
							</div>
				<?php
			}
			if ( 'boxy-clean' === $theme ) {
				?>
						</ul>
					</div>
				<?php
			}
			if ( 'crayon_slider' === $theme || 'sallet_slider' === $theme || 'blog-carousel' === $theme ) {
				?>
				</ul>
				</div>
				<?php
			}
			if ( 'media-grid' === $theme ) {
				?>
				</div>
				<?php
			}
			if ( 'blog-grid-box' === $theme ) {
				?>
				</div>
				<?php
			}
			if ( 'ticker' === $theme ) {
				?>
						</ul>
					</div>
				</div>
				<?php
			}
			if ( 'crayon_slider' !== $theme && 'sallet_slider' !== $theme && 'blog-carousel' !== $theme && 'ticker' !== $theme && 'paged' === $pagination_type ) {
				echo '<div class="wl_pagination_box bd_pagination_box ' . esc_attr( $class ) . '">';
				echo wp_kses( self::bd_pagination(), $args_kses );
				echo '</div>';
			}
			if ( $max_num_pages > 1 && 'load_more_btn' === $pagination_type ) {
				echo '</div>';
			}
			if ( $max_num_pages > 1 && 'load_more_btn' === $pagination_type && 'crayon_slider' !== $theme && 'sallet_slider' !== $theme && 'blog-carousel' !== $theme && 'ticker' !== $theme ) {
				$is_loadmore_btn = '';
				if ( $max_num_pages > 1 ) {
					$is_loadmore_btn = '';
				} else {
					$is_loadmore_btn = '1';
				}
				$template  = '';
				$template .= '<form name="bdp-load-more-hidden" id="bdp-load-more-hidden">';
				$template .= '<input type="hidden" name="paged" id="paged" value="' . $paged . '" />';
				$template .= '<input type="hidden" name="posts_per_page" id="posts_per_page" value="' . $posts_per_page . '" />';
				$template .= '<input type="hidden" name="max_num_pages" id="max_num_pages" value="' . $max_num_pages . '" />';
				$template .= '<input type="hidden" name="blog_template" id="blog_template" value="' . $theme . '" />';
				$template .= wp_nonce_field( 'blog_nonce_front', 'front_nonce' );
				$template .= '<input type="hidden" name="blog_layout" id="blog_layout" value="blog_layout" />';

				$template .= '<div style="display: none" class="loading-image" ><div class="bdp-circularG-wrapper"><div class="bdp-circularG bdp-circularG_1"></div><div class="bdp-circularG bdp-circularG_2"></div><div class="bdp-circularG bdp-circularG_3"></div><div class="bdp-circularG bdp-circularG_4"></div><div class="bdp-circularG bdp-circularG_5"></div><div class="bdp-circularG bdp-circularG_6"></div><div class="bdp-circularG bdp-circularG_7"></div><div class="bdp-circularG bdp-circularG_8"></div></div></div>';
				$template .= '</form>';
				if ( '' == $is_loadmore_btn ) {
					$template .= '<div class="bdp-load-more text-center" style="float:left;width:100%">';
					$template .= '<a href="javascript:void(0)" class="button bdp-load-more-btn template-1">';

					$template .= ( isset( $settings['loadmore_button_text'] ) && '' != $settings['loadmore_button_text'] ) ? $settings['loadmore_button_text'] : esc_html__( 'Load More', 'blog-designer' );

					$template .= '</a>';
					$template .= '</div>';
				}
				echo $template;
			}
			if ( '' != $main_container_class ) {
				echo '</div>';
			}
			echo '</div>';
		}

		wp_reset_postdata();
		$wp_query = null;
		$wp_query = $temp_query;
		$content  = ob_get_clean();
		return $content;
	}

Code file location:

blog-designer/blog-designer/public/class-blog-designer-lite-public.php

Blog Designer [wp_blog_designer_ticker] Shortcode

The ‘wp_blog_designer_ticker’ shortcode is used to display a blog news ticker on your WordPress site. This ticker shows the latest posts dynamically, based on specified categories, tags, and authors. The related PHP code defines the function ‘blog_designer_ticker_view’. It fetches the settings from the ‘wp_blog_news_ticker’ option, and creates a query to get the posts. The function also includes styling for the ticker.

Shortcode: [wp_blog_designer_ticker]

Examples and Usage

Basic example – Displaying a blog ticker with default settings.

[wp_blog_designer_ticker]

PHP Function Code

In case you have difficulties debugging what causing issues with [wp_blog_designer_ticker] shortcode, check below the related PHP functions code.

Shortcode line:

add_shortcode( 'wp_blog_designer_ticker', array( $this, 'blog_designer_ticker_view' ) );

Shortcode PHP function:

function blog_designer_ticker_view() {
		ob_start();
		$author   = array();
		$cat      = array();
		$tag      = array();
		$category = '';
		$settings = get_option( 'wp_blog_news_ticker' );
		if ( isset( $settings['template_category'] ) ) {
			$cat = $settings['template_category'];
		}
		if ( ! empty( $cat ) ) {
			foreach ( $cat as $cat_ojb ) :
				$category .= $cat_ojb . ',';
			endforeach;
			$cat = rtrim( $category, ',' );
		} else {
			$cat = array();
		}
		if ( isset( $settings['template_tags'] ) ) {
			$tag = $settings['template_tags'];
		}
		if ( empty( $tag ) ) {
			$tag = array();
		}
		$tax_query = array();
		if ( ! empty( $cat ) && ! empty( $tag ) ) {
			$cat       = explode( ',', $cat );
			$tax_query = array(
				'relation' => 'OR',
				array(
					'taxonomy' => 'category',
					'field'    => 'term_id',
					'terms'    => $cat,
					'operator' => 'IN',
				),
				array(
					'taxonomy' => 'post_tag',
					'field'    => 'term_id',
					'terms'    => $tag,
					'operator' => 'IN',
				),
			);
		} elseif ( ! empty( $tag ) ) {
			$tax_query = array(
				'relation' => 'AND',
				array(
					'taxonomy' => 'post_tag',
					'field'    => 'term_id',
					'terms'    => $tag,
					'operator' => 'IN',
				),
			);
		} elseif ( ! empty( $cat ) ) {
			$cat       = explode( ',', $cat );
			$tax_query = array(
				'relation' => 'AND',
				array(
					'taxonomy' => 'category',
					'field'    => 'term_id',
					'terms'    => $cat,
					'operator' => 'IN',
				),
			);
		}
		if ( isset( $settings['template_authors'] ) && '' != $settings['template_authors'] ) {
			$author = $settings['template_authors'];
			$author = implode( ',', $author );
		}
		$posts_per_page = get_option( 'posts_per_page' );
		$paged          = Blog_Designer_Lite_Admin::bd_paged();
		$order          = 'DESC';
		$orderby        = 'date';
		if ( isset( $settings['bdp_blog_order_by'] ) && '' != $settings['bdp_blog_order_by'] ) {
			$orderby = $settings['bdp_blog_order_by'];
		}
		if ( isset( $settings['bdp_blog_order'] ) && isset( $settings['bdp_blog_order_by'] ) && '' != $settings['bdp_blog_order_by'] ) {
			$order = $settings['bdp_blog_order'];
		}
		$args              = array(
			'posts_per_page' => $posts_per_page,
			'paged'          => $paged,
			'tax_query'      => $tax_query,
			'author'         => $author,
			'orderby'        => $orderby,
			'order'          => $order,
		);
		$news_ticker_label = ( isset( $settings['news_ticker_label'] ) && '' != $settings['news_ticker_label'] ) ? $settings['news_ticker_label'] : esc_html__( 'Latest Blog', 'blog-designer' );

		global $wp_query;
		$temp_query = $wp_query;
		$loop       = new WP_Query( $args );
		$wp_query   = $loop;
		$wp_query   = null;
		$wp_query   = $temp_query;
		if ( $loop->have_posts() ) {
			?>
			<div class="blog-ticker-wrapper" id="blog-ticker-style-1" data-conf="{&quot;ticker_effect&quot;:&quot;fade&quot;,&quot;autoplay&quot;:&quot;true&quot;,&quot;speed&quot;:3000,&quot;font_style&quot;:&quot;normal&quot;,&quot;scroll_speed&quot;:1}">
				<div class="ticker-title">
					<div class="ticker-style-title"><?php echo esc_attr( $news_ticker_label ); ?></div>
					<span></span>
				</div>
				<div class="blog-ticker-controls">
					<div class="blog-ticker-arrows"><span class="blog-ticker-arrow blog-ticker-arrow-prev"></span></div>
					<div class="blog-ticker-arrows"><span class="blog-ticker-arrow blog-ticker-arrow-next"></span></div>
				</div>
				<div class="blog-tickers">
					<ul>
					<?php
					while ( $loop->have_posts() ) :
						$loop->the_post();
						?>
							<li>
								<a class="blog-ticker-anchor" href="#"><?php echo esc_html( get_the_title() ); ?></a>

							</li>
							<?php
					endwhile;
					?>
					</ul>
				</div>
			</div>
			<?php
		}
		$templatecolor       = ( isset( $settings['template_color'] ) && '' != $settings['template_color'] ) ? $settings['template_color'] : '#2096cd';
		$template_text_color = ( isset( $settings['template_text_color'] ) && '' != $settings['template_text_color'] ) ? $settings['template_text_color'] : '#fff';
		$template_titlecolor = ( isset( $settings['template_titlecolor'] ) && '' != $settings['template_titlecolor'] ) ? $settings['template_titlecolor'] : '#fff';

		?>
		<style type="text/css">
			#blog-ticker-style-1 {
				border-color: <?php echo esc_attr( $templatecolor ); ?>;
			}
			#blog-ticker-style-1 .ticker-title {
				background-color: <?php echo esc_attr( $templatecolor ); ?>;
			}
			#blog-ticker-style-1 .ticker-style-title {
				color: <?php echo esc_attr( $template_text_color ); ?>;
			}
			#blog-ticker-style-1 .ticker-title>span {
				border-color: transparent transparent transparent <?php echo esc_attr( $templatecolor ); ?>;
			}
			#blog-ticker-style-1 .ticker-title>span {
				width: 0;
				position: absolute;
				right: -10px;
				top: 0;
				height: 0;
				border-style: solid;
				border-width: 10px 0 10px 10px;
				bottom: 0;
				border-color: transparent transparent transparent <?php echo esc_attr( $templatecolor ); ?>;
				margin: auto;
			}
			#blog-ticker-style-1 .blog-tickers a:hover {
				color: <?php echo esc_attr( $templatecolor ); ?>;
			}
			#blog-ticker-style-1 .blog-tickers a {
				color: <?php echo esc_attr( $template_titlecolor ); ?>;
			}
			#blog-ticker-style-1 .blog-ticker-controls .blog-ticker-arrows {
				background-color: #f6f6f6;
				border-color: #999999;
			}
			#blog-ticker-style-1 .blog-ticker-controls .blog-ticker-arrows:hover {
				background-color: #eeeeee;
			}
		</style>
		<?php

		$wp_query = null;
		$wp_query = $temp_query;
		$content  = ob_get_clean();
		return $content;
	}

Code file location:

blog-designer/blog-designer/public/class-blog-designer-lite-public.php

Conclusion

Now that you’ve learned how to embed the Blog Designer Plugin shortcodes, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *