5 Ways To Add Responsive Google Maps To Your Website

Once in a while, you may have a web design customer ask specifically about responsive Google Maps. Now if you’re already familiar with Duda’s platform, you’ll know its professional-grade website builder comes with a fantastic  responsive map widget powered by Mapbox. We love Mapbox because it allows for easy integration into mobile and online applications, and is highly adaptable to new map designs and layouts. Not to mention, it has great global coverage.  That said, if a Google Map is required for a project, you’re still covered. Duda’s flexible platform enables you to easily add nearly any kind of map you and your customers would like...

Building a block with Advanced Custom Fields

The new block-based editor in WordPress provides a great new content editing experience, and it’s even more powerful with custom blocks. The core blocks are built using React and JavaScript. You can build your own Gutenberg blocks with JavaScript as well. If you plan to distribute your block publicly as a plugin, I recommend building it with JavaScript to keep it lean and decrease dependencies on other libraries. When building a single website with many unique blocks, it’s more effective to use a block-building plugin like Advanced Custom Fields. You can build blocks much faster by leveraging a tool you likely already...

Define a Specific Sidebar Using Custom Fields

Do you want to define the custom sidebar for specific posts by replacing the get_sidebar() function? While there can be no plugin to achieve this, we have created a quick code snippet that you can use to define a specific sidebar using custom field in WordPress. Instructions: All you have to do is add this code to your theme’s template file where you want to call the custom sidebar: <?php $sidebar = get_post_meta($post->ID, "sidebar", true); get_sidebar($sidebar); ?> Note: If this is your first time adding code snippets in WordPress, then please refer to our guide on how to properly add...

How to remove “Archive:”, “Category:” etc. pre-title inserts in Archive Titles

If you would like to get rid of the “Category:”, “Tag:”, “Author:”, “Archives:” and “Other taxonomy name:” in the archive title, use this little function in your (child) theme functions.php file: Code: add_filter( 'get_the_archive_title', 'my_theme_archive_title' ); /** * Remove archive labels. * * @param string $title Current archive title to be displayed. * @return string Modified archive title to be displayed. */ function my_theme_archive_title( $title ) { if ( is_category() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = single_tag_title( '', false ); } elseif ( is_author() ) { $title = '<span class="vcard">' . get_the_author() . '</span>'; } elseif ( is_post_type_archive() )...

Remove taxonomy slugs (categories, post tags and custom taxonomies) from URL

In this post I will show you how to remove «category» from WordPress categories URL, how to remove «tag» from post tags URLs, and how to remove custom taxonomy slugs («product_cat») from term URLs: Here is the main part of thе code, you can insert it into your current theme functions.php, just do not forget to change taxonomy names/slugs in each function to your own values. add_filter('request', 'rudr_change_term_request', 1, 1 ); function rudr_change_term_request($query){ $tax_name = 'product_cat'; // specify you taxonomy name here, it can be also 'category' or 'post_tag' // Request for child terms differs, we should make an additional check if(...

How to Enable Photoshop Save For Web Feature in GIMP

n case you are not aware, GIMP is an open source image editing software that is bundled in most Linux distro and is touted as the closest alternative to Photoshop. It comes with plenty of toolset and filters for you to create/edit your image, and the best thing of all, it is free. However, as good as it can get, there are several handy and useful features Photoshop that are not available in GIMP and one of them is the Save For Web feature. I used the Photoshop’s Save For Web feature extensively as it enables me to optimize my...

Full and wide alignment in Gutenberg

The new WordPress block editor includes two new alignment options. To take advantage of the new alignment options, your theme must first support them. Include add_theme_support( 'align-wide' ) in your functions.php file. Full Alignment The .alignfull option should span the full width of the screen. I typically do this using the following CSS: .alignfull { margin: 32px calc(50% - 50vw); max-width: 100vw; width: 100vw; } The margin property can accept up to 4 values. In this case I provided 2 properties so the first ( 32px) is applied to the top and bottom, and the second (calc( 50% - 50vw)) is applied to the left and right....

Gutenberg Blocks – Wide Alignment and Full-width

The Gutenberg editor introduces some new and interesting alignment options:- full-widthwide-alignment These options require that your theme explicitly supports them.  See Developer Aside for a deeper discussion on what is needed to support these alignment options. What Does Full-Width Mean with a Sidebar? Since the use of wide-aligned and full-width may not be entirely sensible on a page with a sidebar, here is a demonstration of wide-aligned and full-width content on a single-column page. Websites with sidebars have gone out of fashion and are becoming less common to see; it’s probable that the introduction of these features to the widely used WordPress software will exaggerate that trend. What...