Year: 2022
Display post type / custom postype using slick slider
Requirements : Lazy Block Plugin Jquery Library Slick JS Library (enqueue both css and js) Steps : Install the plugin and enqueue the libraries mentioned above Go to lazy and create a new block On your lazy block, add this fields This are the types of the field use above. kindly follow it. Post Type […]
Embed video on a post and display it on a single post and a page.
Display on a Single Post <?php /* Video Embed */ ?> <div class=”embed-container”> <?php the_field(‘video’); ?> </div> Display on a Page <?php /** ** Custom Post Video **/ ?> <style> .wp-block-lazyblock-custom-post-video{ display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; position:relative; } .team_all_box{ background: #F5F5FF; border-radius:5px; } /* PAGINATION */ .pagination{ position:absolute; bottom:-3em; text-align:center; width:100%; } […]
Display Taxonomy Terms with featured image
Requirements for this topic ACF Taxonomy / Custom Taxonomy / Built-in Taxonomy (category, tags etc.) Lazy Block add/create a custom field on your ACF plugin for the featured image of your taxonomy. There are 3 things to note on the images above. Refer it to its number. Field Name – you need to copy the […]
Display Custom Field
This documentation covers how to display a custom field. Create a Field Group by clicking “Add New” button. After clicking Add new you can now add your fields. (in this tutorial we will only add one field.) Select the Type of Field you want in the Field Type (ex: Text) and Enter your Field Label. […]
How to make a custom patterns?
register_block_pattern( string $pattern_name, array $pattern_properties ) This is how to registered a custom block pattern. Copy and paste the code above, to functions.php The ‘content’ is where we can put or write the design layout of the pattern, this is how to get code on the page editor. see the screenshot below.
How to display all the child of the parent page
Parameter: ‘child_of’ – (int) Page ID to return child and grandchild pages of. ‘exclude’ – (int[]) Array of page IDs to exclude. ‘sort_column’ – (string) What columns to sort pages by, comma-separated. ‘sort_order’ – (string) How to sort retrieved pages. Accepts ‘ASC’, ‘DESC’. For more information about the get_pages function, you can visit here. $args = array( ‘exclude’ => […]
Custom Taxonomy Block
A dyanmic block that outputs custom taxonomy of a custom post type. REQUIRED LAZYBLOCK FIELDS:font-size = NUMBERfont-color = COLOR PICKERtext-transform = SELECT/TEXTletter-spacing = NUMBER <?php /** * Template for Auction Type [Taxonomy] */ global $post; $font_size = $attributes[‘font-size’]; $font_color = $attributes[‘font-color’]; $text_transform = $attributes[‘text-transform’]; $letter_spacing = $attributes[‘letter-spacing’]; $auction_type = get_object_term_cache( $post->ID, ‘auction-types’ ); ?> <style> […]
Custom Post Type Slider
A block that queries and outputs custom post types in a slider using slickslider. REQUIRED LIBRARIES (insert these in enqueuing styles and scripts in functions.php):wp_enqueue_script( ‘slick-js’, ‘https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.js’);wp_enqueue_style( ‘slick-css’, ‘https://cdnjs.cloudflare.com/ajax/libs/slick-carousel/1.9.0/slick.min.css’ ); REQUIRED LAZYBLOCK FIELDS:slide-count = NUMBERbutton-text = TEXTtitle-color = COLOR PICKERtitle-size = NUMBER Still looking for solutions on how to make slickslider work in wp backend. […]