{"id":256,"date":"2012-08-25T14:01:09","date_gmt":"2012-08-25T14:01:09","guid":{"rendered":"http:\/\/pixert.com\/blog\/?p=256"},"modified":"2012-08-29T08:39:32","modified_gmt":"2012-08-29T08:39:32","slug":"exclude-featured-posts-from-wpzoom-featured-category-widget","status":"publish","type":"post","link":"https:\/\/pixert.com\/blog\/exclude-featured-posts-from-wpzoom-featured-category-widget\/","title":{"rendered":"Exclude Featured Posts from WPZOOM: Featured Category Widget"},"content":{"rendered":"<p style=\"text-align: center;\">\n<p style=\"text-align: center;\"><a href=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" data-attachment-id=\"258\" data-permalink=\"https:\/\/pixert.com\/blog\/exclude-featured-posts-from-wpzoom-featured-category-widget\/zenkofeapostswidget\/\" data-orig-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?fit=580%2C459&amp;ssl=1\" data-orig-size=\"580,459\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;}\" data-image-title=\"Zenko Featured Posts Widget\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?fit=300%2C237&amp;ssl=1\" data-large-file=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?fit=580%2C459&amp;ssl=1\" class=\"size-medium wp-image-258 aligncenter\" title=\"Zenko Featured Posts Widget\" src=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget-300x237.jpg?resize=300%2C237\" alt=\"\" width=\"300\" height=\"237\" srcset=\"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?resize=300%2C237&amp;ssl=1 300w, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?w=580&amp;ssl=1 580w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p><a title=\"Buy Zenko from WPZOOM\" href=\"http:\/\/www.wpzoom.com\/members\/go.php?r=978&amp;i=l68\">Zenko <\/a>WPZOOM Demo Site (see the documentation)<br \/>\nI made customization to the widget to exclude Same Posts already been shown on Featured Slider to avoid duplication<\/p>\n<p>1. Open featured-category.php in wp-content\/themes\/zenko\/functions\/theme\/widgets folder<\/p>\n<p>2. Replace all code in featured-category.php with the following<\/p>\n<pre class=\"brush: plain; title: Code Block; notranslate\" title=\"Code Block\">\r\n\r\n&lt;?php \/*------------------------------------------*\/ \/* WPZOOM: Featured Category widget *\/ \/*------------------------------------------*\/ $wpzoomColors = array(); $wpzoomColors&#x5B;'blue'] = 'Blue'; $wpzoomColors&#x5B;'green'] = 'Green'; $wpzoomColors&#x5B;'pink'] = 'Pink'; $wpzoomColors&#x5B;'black'] = 'Black'; class wpzoom_widget_category extends WP_Widget { \/* Widget setup. *\/  function wpzoom_widget_category() {  \/* Widget settings. *\/  $widget_ops = array( 'classname' =--&gt; 'wpzoom', 'description' =&gt; __('Featured Category Widget for Homepage', 'wpzoom') );\r\n\r\n\/* Widget control settings. *\/\r\n $control_ops = array( 'width' =&gt; 250, 'height' =&gt; 350, 'id_base' =&gt; 'wpzoom-widget-cat' );\r\n\r\n\/* Create the widget. *\/\r\n $this-&gt;WP_Widget( 'wpzoom-widget-cat', __('WPZOOM: Featured Category', 'wpzoom'), $widget_ops, $control_ops );\r\n }\r\n\r\n\/* How to display the widget on the screen. *\/\r\n function widget( $args, $instance ) {\r\n extract( $args );\r\n\r\n\/* Our variables from the widget settings. *\/\r\n $title1 = apply_filters('widget_title', $instance&#x5B;'title1'] );\r\n $color1 = $instance&#x5B;'color1'];\r\n $posts1 = $instance&#x5B;'posts1'];\r\n $category1 = get_category($instance&#x5B;'category1']);\r\n if ($category1) {\r\n $categoryLink1 = get_category_link($category1);\r\n }\r\n\r\n\/* Before widget (defined by themes). *\/\r\n \/\/echo $before_widget;\r\n\r\n$z = 0;\r\n while ($z &lt; 1)  {  $z++; $color = &quot;color$z&quot;;  $categoryLink = &quot;categoryLink$z&quot;;  $title = &quot;title$z&quot;;  $posts = &quot;posts$z&quot;;  $category = $instance&#x5B;&quot;category$z&quot;]; ?&gt;&lt;\/pre&gt;\r\n&lt;div class=&quot;block&quot;&gt;&lt;!--?php if ( $$title ) { echo '&lt;br ?--&gt;\r\n&lt;h3 class=&quot;'.$$color.'&quot;&gt;&lt;a href=&quot;'.$$categoryLink.'&quot;&gt;'.$$title.' \u00bb&lt;\/a&gt;&lt;\/h3&gt;\r\n '; } ?&gt;\r\n\r\n&lt;?php  $featured_posts = new WP_Query(  array(  'post__not_in' =--&gt; get_option( 'sticky_posts' ),\r\n 'meta_key' =&gt; 'wpzoom_is_featured',\r\n 'meta_value' =&gt; 1\r\n ) );\r\n\r\n while ($featured_posts-&gt;have_posts()) {\r\n $featured_posts-&gt;the_post();\r\n global $post;\r\n $postIDs&#x5B;] = $post-&gt;ID;\r\n }\r\n $args=array( 'cat' =&gt; $category, 'post__not_in' =&gt; $postIDs, 'showposts' =&gt; $$posts, 'orderby' =&gt; 'date', 'order' =&gt; 'DESC' );\r\n $second_query = new WP_Query( $args );\r\n\r\n$i = 0;\r\n if ( $second_query-&gt;have_posts() ) : while( $second_query-&gt;have_posts() ) : $second_query-&gt;the_post();\r\n unset($image,$cropLocation);\r\n $i++;\r\n global $post;\r\n\r\nif ($i == 1)\r\n { ?&gt;\r\n&lt;div class=&quot;firstn&quot;&gt;\r\n&lt;?php get_the_image( array( 'size' =--&gt; 'featured-cat', 'width' =&gt; 235, 'height' =&gt; 140 ) ); ?&gt;\r\n&lt;h2&gt;&lt;\/h2&gt;\r\n&lt;small&gt;&lt;?php printf('%s at %s', get_the_date(), get_the_time()); ?&gt;&lt;\/small&gt;\r\n\r\n&lt;?php the_content_limit(170); ?&gt;&lt;\/div&gt;\r\n&lt;!-- A list with another 3 articles from the same category--&gt;\r\n&lt;div class=&quot;rightn&quot;&gt;\r\n&lt;ul&gt;\r\n&lt;ul&gt;\r\n&lt;li&gt;&lt;?php get_the_image( array( 'size' =--&gt; 'featured-cat-small', 'width' =&gt; 90, 'height' =&gt; 80 ) ); ?&gt;\r\n&lt;div class=&quot;rightcont&quot;&gt;\r\n&lt;div class=&quot;bubble&quot;&gt;&lt;\/div&gt;\r\n&lt;?php the_content_limit(110, ''); ?&gt;\r\n\r\n&lt;small&gt;&lt;?php printf('%s at %s', get_the_date(), get_the_time()); ?&gt;&lt;\/small&gt;&lt;\/div&gt;\r\n&lt;div style=&quot;clear: both;&quot;&gt;&lt;\/div&gt;&lt;\/li&gt;\r\n&lt;\/ul&gt;\r\n&lt;\/ul&gt;\r\n &lt;?php else :\r\n echo'';\r\n _e('There are no posts in this category.', 'wpzoom');\r\n echo'\r\n\r\n';\r\n endif;\r\n ?&gt;&lt;\/div&gt;\r\n&lt;div class=&quot;clear&quot;&gt;&lt;\/div&gt;\r\n&lt;\/div&gt;\r\n&lt;pre&gt;\r\n&lt;!-- end .category --&gt;\r\n&lt;!--?php &lt;br ?--&gt;\r\n} \/\/ while\r\n echo ' &lt;!-- end .featCategory --&gt;';\r\n \/* After widget (defined by themes). *\/\r\n \/\/echo $after_widget;\r\n wp_reset_query();\r\n }\r\n\r\n\/* Update the widget settings.*\/\r\n function update( $new_instance, $old_instance ) {\r\n $instance = $old_instance;\r\n\r\n\/* Strip tags for title and name to remove HTML (important for text inputs). *\/\r\n $instance&#x5B;'title1'] = strip_tags( $new_instance&#x5B;'title1'] );\r\n $instance&#x5B;'category1'] = $new_instance&#x5B;'category1'];\r\n $instance&#x5B;'color1'] = $new_instance&#x5B;'color1'];\r\n $instance&#x5B;'posts1'] = $new_instance&#x5B;'posts1'];\r\n\r\nreturn $instance;\r\n }\r\n\r\n\/** Displays the widget settings controls on the widget panel.\r\n * Make use of the get_field_id() and get_field_name() function when creating your form elements. This handles the confusing stuff. *\/\r\n function form( $instance ) {\r\n\r\n\/* Set up some default widget settings. *\/\r\n $defaults = array( 'title1' =&gt; __('Category Name', 'wpzoom'), 'category1' =&gt; '0', 'color1' =&gt; 'blue', 'posts1' =&gt; '4' );\r\n $instance = wp_parse_args( (array) $instance, $defaults );\r\n global $wpzoomColors;\r\n ?&gt;\r\n\r\n&lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id( 'title1' ); ?&gt;&quot;&gt;&lt;?php _e('Category Title:', 'wpzoom'); ?&gt;&lt;\/label&gt;\r\n &lt;input id=&quot;&lt;?php echo $this-&gt;get_field_id( 'title1' ); ?&gt;&quot; class=&quot;widefat&quot; type=&quot;text&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name( 'title1' ); ?&gt;&quot; value=&quot;&lt;?php echo $instance&#x5B;'title1']; ?&gt;&quot; \/&gt;\r\n\r\n&lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('color1'); ?&gt;&quot;&gt;&lt;?php _e('Title Background Color:', 'wpzoom'); ?&gt;&lt;\/label&gt;\r\n\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('color1'); ?&gt;&quot;&gt; &lt;?php  foreach ($wpzoomColors as $key =--&gt; $value) { $option = '&lt;option selected=&quot;selected&quot; value=&quot;'.$key;  if ($key == $instance&#x5B;'color1']) { $option .='&quot;&gt;';&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('color1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$key;  if ($key == $instance&#x5B;'color1']) { $option .='&quot;&gt; $option .= $value;&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('color1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$key;  if ($key == $instance&#x5B;'color1']) { $option .='&quot;&gt; $option .= '&lt;\/option&gt;';&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('color1'); ?&gt;&quot;&gt; echo $option;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('color1'); ?&gt;&quot;&gt; }&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('color1'); ?&gt;&quot;&gt; ?&gt;&lt;\/select&gt;\r\n\r\n\r\n&lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('category1'); ?&gt;&quot;&gt;&lt;?php _e('Category:', 'wpzoom'); ?&gt;&lt;\/label&gt;\r\n\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt; &lt;option value=&quot;0&quot;&gt;Choose category:&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt; &lt;?php &lt;br \/&gt; ?&gt; $cats = get_categories('hide_empty=0');&lt;\/select&gt;\r\n\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt;foreach ($cats as $cat) {&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt; $option = '&lt;option selected=&quot;selected&quot; value=&quot;'.$cat-&gt;term_id;&lt;br \/&gt; if ($cat-&gt;term_id == $instance&#x5B;'category1']) { $option .='&quot;&gt;';&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$cat-&gt;term_id;&lt;br \/&gt; if ($cat-&gt;term_id == $instance&#x5B;'category1']) { $option .='&quot;&gt; $option .= $cat-&gt;cat_name;&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$cat-&gt;term_id;&lt;br \/&gt; if ($cat-&gt;term_id == $instance&#x5B;'category1']) { $option .='&quot;&gt; $option .= ' ('.$cat-&gt;category_count.')';&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$cat-&gt;term_id;&lt;br \/&gt; if ($cat-&gt;term_id == $instance&#x5B;'category1']) { $option .='&quot;&gt; $option .= '&lt;\/option&gt;';&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt; echo $option;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt; }&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('category1'); ?&gt;&quot;&gt; ?&gt;&lt;\/select&gt;\r\n\r\n\r\n&lt;label for=&quot;&lt;?php echo $this-&gt;get_field_id('posts1'); ?&gt;&quot;&gt;&lt;?php _e('Posts to show:', 'wpzoom'); ?&gt;&lt;\/label&gt;\r\n\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; &lt;?php &lt;br ?&gt; $m = 0;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; while ($m &lt; 11) {&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; $m++;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; $option = '&lt;option selected=&quot;selected&quot; value=&quot;'.$m;  if ($m == $instance&#x5B;'posts1']) { $option .='&quot;&gt;';&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$m;  if ($m == $instance&#x5B;'posts1']) { $option .='&quot;&gt; $option .= $m;&lt;\/option&gt;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt;&lt;option selected=&quot;selected&quot; value=&quot;'.$m;  if ($m == $instance&#x5B;'posts1']) { $option .='&quot;&gt; $option .= '&lt;\/option&gt;';&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; echo $option;&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; }&lt;\/select&gt;\r\n&lt;select style=&quot;width: 90%;&quot; name=&quot;&lt;?php echo $this-&gt;get_field_name('posts1'); ?&gt;&quot;&gt; ?&gt;&lt;\/select&gt;\r\n\r\n\r\n&lt;?php  } } function wpzoom_register_category_widget() {  register_widget('wpzoom_widget_category'); } add_action('widgets_init', 'wpzoom_register_category_widget'); ?&gt;\r\n\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Zenko WPZOOM Demo Site (see the documentation) I made customization to the widget to exclude Same Posts already been shown on Featured Slider to avoid duplication 1. Open featured-category.php in wp-content\/themes\/zenko\/functions\/theme\/widgets folder 2. Replace all code in featured-category.php with the following &lt;?php \/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*\/ \/* WPZOOM: Featured Category widget *\/ \/*&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;*\/ $wpzoomColors = array(); $wpzoomColors&#x5B;&#8217;blue&#8217;] = [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":258,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[54,5],"tags":[55,114,6,95],"class_list":["post-256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-code-snippet","category-wordpress","tag-code-snippet-2","tag-themes","tag-wordpress-2","tag-wpzoom"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/08\/zenkofeapostswidget.jpg?fit=580%2C459&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/p1pvi1-48","jetpack-related-posts":[{"id":284,"url":"https:\/\/pixert.com\/blog\/how-to-add-show-thumbnail-option-in-wpzoom-featured-category-widget\/","url_meta":{"origin":256,"position":0},"title":"How to add &#8216;Show Thumbnail&#8217; option in WPZOOM Featured Category Widget","author":"Pixel Insert \/ Pixert","date":"February 18, 2013","format":false,"excerpt":"Tribune is a lovely magazine theme from WPZOOM. The theme has custom widgets name WPZOOM Featured Category Widget You could use this widget to display categories on homepage like the demo site\u00a0(Politics - World - Sports - Automotive). The widget show thumbnails by default, it doesn't have feature to disable\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"WPZOOMFeaturedCategory","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/02\/WPZOOMFeaturedCategory.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":218,"url":"https:\/\/pixert.com\/blog\/how-to-fix-custom-field-for-thumbnails-wpzoom-featured-category-widget\/","url_meta":{"origin":256,"position":1},"title":"How to fix Custom Field for thumbnails in WPZoom Featured Category widget","author":"Pixel Insert \/ Pixert","date":"April 6, 2012","format":false,"excerpt":"WPZoom Featured Widget is a widget built inside WPZOOM themes to show Featured Category posts The widget display thumbnail images, post titles and post meta datas from selected Featured Category There's a bug in wpzoom-widgets.php where as all widgets code are. The widget cannot display thumbnail images from custom field\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2012\/04\/featuredcat-208x300.jpg?resize=350%2C200","width":350,"height":200},"classes":[]},{"id":222,"url":"https:\/\/pixert.com\/blog\/wpzoom-featured-category-widget-videozoom\/","url_meta":{"origin":256,"position":2},"title":"WPZoom Featured Category Widget with video for Videozoom theme","author":"Pixel Insert \/ Pixert","date":"April 6, 2012","format":false,"excerpt":"I made the following widget code to show Featured Category with Video embed code. The following widget works with Videozoom theme from WPZoom Open wpzoom-widgets.php in the functions folder of Videozom. \u00a0Add the following code at the bottom of the wpzoom-widgets.php [php] \/*---------------------------------------------*\/ \/* WPZOOM: Featured Category widget with Video\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":546,"url":"https:\/\/pixert.com\/blog\/the-importance-of-child-theme-in-wordpress\/","url_meta":{"origin":256,"position":3},"title":"The importance of Child Theme in WordPress","author":"Pixel Insert \/ Pixert","date":"March 4, 2021","format":false,"excerpt":"I've been using WordPress for a very long time and one of the things I have and will do is customize themes. I'm writing this because I was lazy to use a child theme for my main site. As a result, I had to enter the Slideshow code every time\u2026","rel":"","context":"In &quot;WordPress&quot;","block_context":{"text":"WordPress","link":"https:\/\/pixert.com\/blog\/category\/wordpress\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2021\/03\/618F75E4-2D1B-4A2B-B95D-37A990FB1A7A.jpeg?fit=933%2C1200&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2021\/03\/618F75E4-2D1B-4A2B-B95D-37A990FB1A7A.jpeg?fit=933%2C1200&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2021\/03\/618F75E4-2D1B-4A2B-B95D-37A990FB1A7A.jpeg?fit=933%2C1200&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2021\/03\/618F75E4-2D1B-4A2B-B95D-37A990FB1A7A.jpeg?fit=933%2C1200&ssl=1&resize=700%2C400 2x"},"classes":[]},{"id":130,"url":"https:\/\/pixert.com\/blog\/enable-formatting-tags-for-content-limit-in-genesis-featured-posts-widget\/","url_meta":{"origin":256,"position":4},"title":"Enable Formatting Tags for Content Limit in Genesis Featured Posts widget","author":"Pixel Insert \/ Pixert","date":"January 10, 2013","format":false,"excerpt":"Genesis Framework has same function that return the content after trimming and it strips all HTML The following code help you keep or filter some HTML tags when you are using Content Limit in Theme Settings or Widgets (e.g Genesis - Featured Posts widget) Add following to functions.php in the\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/01\/gallerygenesis.jpg?fit=600%2C340&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/01\/gallerygenesis.jpg?fit=600%2C340&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/01\/gallerygenesis.jpg?fit=600%2C340&ssl=1&resize=525%2C300 1.5x"},"classes":[]},{"id":305,"url":"https:\/\/pixert.com\/blog\/wordpress-conditional-tag-to-check-specific-menu\/","url_meta":{"origin":256,"position":5},"title":"WordPress: Conditional tag to check a specific menu","author":"Pixel Insert \/ Pixert","date":"May 22, 2013","format":false,"excerpt":"Following conditional tag usually use in this filter function, wp_nav_menu_items [php]if( $args->theme_location == 'primary' )[\/php] \u00a0 [php]if( $args->theme_location == 'secondary' )[\/php] \u00a0 [php]if( $args->theme_location == 'primary' )[\/php] For an example, I want to add search box to Primary Menu in WPZOOM theme name Videozoom. Conditional tag above make sure the\u2026","rel":"","context":"In &quot;Code Snippet&quot;","block_context":{"text":"Code Snippet","link":"https:\/\/pixert.com\/blog\/category\/code-snippet\/"},"img":{"alt_text":"wordpress-logo-notext-rgb","src":"https:\/\/i0.wp.com\/pixert.com\/blog\/wp-content\/uploads\/2013\/08\/wordpress-logo-notext-rgb.jpg?resize=350%2C200","width":350,"height":200},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/comments?post=256"}],"version-history":[{"count":0,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/posts\/256\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media\/258"}],"wp:attachment":[{"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/media?parent=256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/categories?post=256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pixert.com\/blog\/wp-json\/wp\/v2\/tags?post=256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}