Instructions/Guides

Creating a Search functionality for specific product attributes with autocomplete

This product search functionality shows hints based on the first two letters of the attributes. This functionality also involve adding custom endpoint to handle search request and returning the match attributes as hints. 2. Enqueue Javascript for Autocomplete 3. Create a Javascript file here’s the code: 4. Add the Search Input on the template 5. […]

PHP Code Snippets/Functions Reusable Custom Blocks

Custom number of entry selection

<?php$args = array( ‘post_type’ => ‘sample’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1,);$query = new WP_Query($args);$total_posts = $query->found_posts;$numbers = array(1, 2, 20);if ($total_posts > 0) { $numbers = range(1, min(20, $total_posts));}?><label for=”post-number”>Show</label><select name=”post-number” id=”post-number” class=”post-number-select”> <option value=”-1″ selected>All</option> <?php foreach ($numbers as $number) : ?> <option value=”<?= $number; ?>”><?= $number; ?></option> <?php endforeach; ?></select><label>entries</label> $(‘.post-number-select’).on(‘change’, function […]

Reusable Custom Blocks

Custom Post Type with Custom Filter

Requirements: Copy and paste this code into the custom block. You may modify it as needed to meet the client’s requirements. <?php /* Block Name: Custom Resources */ $args = array( ‘post_type’ => ‘resources_post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1, ‘order’ => ‘ASC’, ); $categories = get_categories(); $used_categories = array(); ?> <div class=”category-filter”> <?php foreach […]

Uncategorized

Full crawling of the live site using screaming frog settings.

The website includes a <meta name=”robots” content=”noindex, nofollow”/> tag within its <head> section. This meta tag instructs web crawlers, including Screaming Frog, to neither index the page nor follow any of its links. To override this and allow full crawling of the website with Screaming Frog, you need to adjust the spider’s settings to ignore […]