People of WordPress: Abdullah Ramzan

You’ve probably heard that WordPress is open-source software, and may know that it’s created and run by volunteers. WordPress enthusiasts share many examples of how WordPress changed people’s lives for the better. This monthly series shares some of those lesser-known, amazing stories.

Meet Abdullah Ramzan, from Lahore, Punjab, Pakistan.

Abdullah Ramzan was born and brought up in the under-developed city of ​Layyah​, which is situated in Southern Punjab, Pakistan and surrounded by desert and the river ​Sindh​.

He graduated from college in his home town and started using a computer in ​2010​ when he joined ​Government College University Faisalabad​. Abdullah’s introduction to WordPress happened while he was finishing the last semester of his degree. His final project was based in WordPress.

Ramzan’s late mother was the real hero in his life, helping him with his Kindergarten homework and seeing him off to school every day. 

Before her heart surgery, Ramzan visited her in the hospital ICU, where she hugged him and said: ​“Don’t worry, everything will be good.” Sadly, his mother died during her surgery. However, her influence on Ramzan’s life continues.

Start of Ramzan’s Career:

After graduation, Ramzan struggled to get his first job. He first joined PressTigers as a Software Engineer and met Khawaja Fahad Shakeel, his first mentor. Shakeel provided Ramzan with endless support. Something had always felt missing in his life, but he felt like he was on the right track for the first time in his life when he joined the WordPress community. 

Community – WordCamps and Meetups:

Although Ramzan had used WordPress since ​2015​, attending WordPress meetups and open source contributions turned out to be a game-changer for him. He learned a lot from the WordPress community and platform, and developed strong relationships with several individuals. One of them is Nidhi Jain​ from Udaipur India who he works with on WordPress development. The second is Jonathan Desrosiers​ who he continues to learn a lot from.

In addition, Usman Khalid, the lead organizer of WC Karachi, mentored Ramzan, helping him to develop his community skills. 

With the mentorship of these contributors, Ramzan is confident supporting local WordPress groups and helped to organize ​WordCamp Karachi​, where he spoke for the first time at an international level event. He believes that WordPress has contributed much to his personal identity. 

Abdullah Ramzan among a group of community members at WordCamp Karachi 2018
Abdullah Ramzan at WordCamp Karachi 2018

WordPress and the Future:

As a ​co-organizer of WordPress Meetup Lahore,​ he would love to involve more people in the community leadership team, to provide a platform for people to gather under one roof, to learn and share something with each other.

But he has loftier ambitions. Impressed by Walk to WordCamp Europe, Abdullah is seriously considering walking to WordCamp Asia. He also one day hopes for the opportunity to serve his country as a senator of Pakistan and intends to enter the next senate election.

Words of Encouragement

Abdullah Ramzan knows there is no shortcut to success. “You have to work hard to achieve your goals,” explained Ramzan. He still has much he wishes to accomplish and hopes to be remembered for his impact on the project.

Abdullah believes WordPress can never die as long as people don’t stop innovating to meet new demands. The beauty of WordPress is that it is made for everyone.

Ramzan encouraged, “If you seriously want to do something for yourself, do something for others first. Go for open source, you’ll surely learn how to code. You’ll learn how to work in a team. Join local meetups, meet with the folks: help them, learn from them, and share ideas.”


This post is based on an article originally published on HeroPress.com, a community initiative created by Topher DeRosia. HeroPress highlights people in the WordPress community who have overcome barriers and whose stories would otherwise go unheard.

Meet more WordPress community members over at HeroPress.com!

Source

People of WordPress: Ugyen Dorji

You’ve probably heard that WordPress is open source software, and may know that it’s created and run by volunteers. WordPress enthusiasts share many examples of how WordPress changed people’s lives for the better. This monthly series shares some of those lesser-known, amazing stories.

Meet Ugyen Dorji from Bhutan

Ugyen lives in Bhutan, a landlocked country situated between two giant neighbors, India to the south and China to the north. He works for ServMask Inc and is responsible for the Quality Assurance process for All-in-One WP Migration plugin.

He believes in the Buddhist teaching that “the most valuable service is one rendered to our fellow humans,” and his contributions demonstrates this through his WordPress translation work and multi-lingual support projects for WordPress.

Bhutanese contributors to the Dzongkha locale on WordPress Translation Day

How Ugyen started his career with WordPress

Back in 2016, Ugyen was looking for a new job after his former cloud company ran into financial difficulties.

During one interview he was asked many questions about WordPress and, although he had a basic understanding of WordPress, he struggled to give detailed answers. After that interview he resolved to develop his skills and learn as much about WordPress as he could. 

A few months passed and he received a call from ServMask Inc, who had developed a plugin called All-in-One WP Migration. They offered him a position, fulfilling his wish to work with WordPress full-time. And because of that, Ugyen is now an active contributor to the WordPress community.

WordCamp Bangkok 2018

WordCamp Bangkok 2018 was a turning point event for Ugyen. WordCamps are a great opportunity to meet WordPress community members you don’t otherwise get to know, and he was able to attend his first WordCamp through the sponsorship of his company.

The first day of WordCamp Bangkok was a Contributor Day, where people volunteer to work together to contribute to the development of WordPress. Ugyen joined the Community team to have conversations with WordPress users from all over the world. He was able to share his ideas for supporting new speakers, events and organizers to help build the WordPress community in places where it is not yet booming.

During the main day of the event, Ugyen managed a photo booth for speakers, organizers, and attendees to capture their memories of WordCamp. He also got to take some time out to attend several presentations during the conference. What particularly stuck in Ugyen’s mind was learning that having a website content plan has been shown to lead to 100% growth in business development.

Co-Organizing Thimphu‘s WordPress Meetup

After attending WordCamp Bangkok 2018 as well as a local Meetup event, Ugyen decided to introduce WordPress to his home country and cities. 

As one of the WordPress Translation Day organizers, he realized that his local language, Dzongkha, was not as fully translated as other languages in the WordPress Core Translation. That is when Ugyen knew that he wanted to help build his local community. He organized Thimphu’s first WordPress Meetup to coincide with WordPress Translation Day 4, and it was a huge success!

Like all WordPress Meetups, the Thimpu WordPress Meetup is an easygoing, volunteer-organized, non-profit meetup which covers everything related to WordPress. But it also keeps in mind the Bhutanese Gross National Happiness four pillars by aiming to preserve and promote their unique culture and national language. 

Big dreams get accomplished one step at a time

Ugyen has taken an active role in preserving his national language by encouraging his community to use WordPress, including Dzongkha bloggers, online Dzongkha news outlets, and government websites.

And while Ugyen has only been actively involved in the community for a short period, he has contributed much to the WordPress community, including:

  • becoming a Translation Contributor for WordPress Core Translation for Dzongkha;
  • participating in the Global WordPress Translation Day 4 Livestream and organizing team;
  • inviting WordPress Meetup Thimphu members and WordPress experts from other countries to join the local Slack instance;
  • encouraging ServMask Inc. to become an event sponsor;
  • providing the Dzongkha Development Commission the opportunity to involve their language experts.

When it comes to WordPress, Ugyen particularly focuses on encouraging local and international language WordPress bloggers; helping startups succeed with WordPress; and sharing what he has learned from WordPress with his Bhutanese WordPress community.

As a contributor, Ugyen hopes to accomplish even more for the Bhutan and Asian WordPress Communities. His dreams for his local community are big, including teaching more people about open source, hosting a local WordCamp, and helping to organize WordCamp Asia in 2020 — all while raising awareness of his community.


This post is based on an article originally published on HeroPress.com, a community initiative created by Topher DeRosia. HeroPress highlights people in the WordPress community who have overcome barriers and whose stories would otherwise go unheard.

Meet more WordPress community members over at HeroPress.com!

Source

WordPress 5.2 “Jaco”

Keeping Sites Safer

Version 5.2 of WordPress, named “Jaco” in honor of renowned and revolutionary jazz bassist Jaco Pastorius, is available for download or update in your WordPress dashboard. New features in this update make it easier than ever to fix your site if something goes wrong.

There are even more robust tools for identifying and fixing configuration issues and fatal errors. Whether you are a developer helping clients or you manage your site solo, these tools can help get you the right information when you need it.


Site Health Check

Building on the Site Health features introduced in 5.1, this release adds two new pages to help debug common configuration issues. It also adds space where developers can include debugging information for site maintainers.

PHP Error Protection

This administrator-focused update will let you safely fix or manage fatal errors without requiring developer time. It features better handling of the so-called “white screen of death,” and a way to enter recovery mode,  which pauses error-causing plugins or themes.


Improvements for Everyone

Accessibility Updates

A number of changes work together to improve contextual awareness and keyboard navigation flow for those using screen readers and other assistive technologies.

New Dashboard Icons

Thirteen new icons including Instagram, a suite of icons for BuddyPress, and rotated Earth icons for global inclusion. Find them in the Dashboard and have some fun!

Plugin Compatibility Checks

WordPress will now automatically determine if your site’s version of PHP is compatible with installed plugins. If the plugin requires a higher version of PHP than your site currently uses, WordPress will not allow you to activate it, preventing potential compatibility errors.


Developer Happiness

PHP Version Bump

The minimum supported PHP version is now 5.6.20. As of WordPress 5.2*, themes and plugins can safely take advantage of namespaces, anonymous functions, and more!

Privacy Updates

A new theme page template, a conditional function, and two CSS classes make designing and customizing the Privacy Policy page easier.

New Body Hook

5.2 introduces a wp_body_open hook, which lets themes support injecting code right at the beginning of the <body> element.

Building JavaScript

With the addition of webpack and Babel configurations in the wordpress/scripts package, developers won’t have to worry about setting up complex build tools to write modern JavaScript.

*If you are running an old version of PHP (less than 5.6.20), update your PHP before installing 5.2.


The Squad

This release was led by Matt Mullenweg, Josepha Haden Chomphosy, and Gary Pendergast. They were graciously supported by 327 generous volunteer contributors. Load a Jaco Pastorius playlist on your favorite music service and check out some of their profiles:

aandrewdixon, Aaron D. Campbell, Aaron Jorbin, Adam Silverstein, Adam Soucie, Adil Öztaşer, Ajit Bohra, Alain Schlesser, aldavigdis, Alex Denning, Alex Kirk, Alex Mills, Alex Shiels, Alexis, Alexis Lloyd, allancole, Allen Snook, André, Andrés, andraganescu, Andrea Fercia, Andrea Middleton, Andrei Lupu, Andrew Duthie, Andrew Nacin, Andrew Ozz, Andrey “Rarst” Savchenko, Andy Fragen, Andy Meerwaldt, Aniket Patel, Anton Timmermans, Anton Vanyukov, Antonio Villegas, antonypuckey, Aristeides Stathopoulos, Aslam Shekh, axaak, Bego Mario Garde, Ben Dunkle, Ben Ritner – Kadence Themes, Benjamin Intal, Bill Erickson, Birgir Erlendsson, Bodo (Hugo) Barwich, bonger, Boone Gorges, Bradley Taylor, Brandon Kraft, Brent Swisher, bulletdigital, Burhan Nasir, Cathi Bosco, Chetan Prajapati, Chiara Magnani, Chouby, Chris Van Patten, D.S. Webster, Damon Cook, Daniel Bachhuber, Daniel James, Daniel Llewellyn, Daniel Richards, Daniele Scasciafratte, Darren Ethier (nerrad), Dave Whitley, DaveFX, davetgreen, David Binovec, David Binovec, David Herrera, David Roddick, David Smith, davidb, Davide ‘Folletto’ Casali, dekervit, Denis de Bernardy, Dennis Snell, Derek Herman, Derrick Hammer, designsimply, Dhanukanuwan, Dharmesh Patel, Diane, diegoreymendez, Dilip Bheda, Dima, Dion Hulse, Dixita Dusara, Dmitry Mayorov, Dominik Schilling, Drew Jaynes, dsifford, Ella van Durpe, etoledom, fabiankaegy, Faisal Alvi, Farhad Sakhaei, Felix Arntz, Franklin Tse, Fuegas, Garrett Hyder, Gary Jones, Gennady Kovshenin, Grzegorz (Greg) Ziółkowski, Guido Scialfa, GutenDev ✍㊙, Hannah Malcolm, Hardik Amipara, Hardik Thakkar, Hendrik Luehrsen, Henry, Henry Wright, Hoover, Ian Belanger, Ian Dunn, ice9js, Igor Zinovyev, imath, Ixium, J.D. Grimes, jakeparis, James, janak Kaneriya, Jarred Kennedy, Javier Villanueva, Jay Upadhyay, Jaydip Rami, Jayman Pandya, jdeeburke, Jean-Baptiste Audras, Jeff Paul, Jeffrey de Wit, Jenny, Jeremy Felt, Jeremy Green, Jeremy Herve, jitendrabanjara1991, JJJ, Joe Dolson, Joe McGill, Joen Asmussen, Johan Falk, Johanna de Vos, John Blackbourn, Jonathan Desrosiers, Jonathandejong, Jonny Harris, jonnybojangles, Joost de Valk, jordesign, Jorge Bernal, Jorge Costa, Jory Hogeveen, Jose Castaneda, josephwa, Josh Feck, JoshuaWold, Joy, jplo, JR Tashjian, jrf, Juhi Patel, juliarrr, K. Adam White, KamataRyo, Karine Do, Katyatina, Kelin Chauhan, Kelly Dwan, Khokan Sardar, killua99, Kite, Kjell Reigstad, Knut Sparhell, Koji Kuno, Konstantin Obenland, Konstantinos Xenos, Kʜᴀɴ (ಠ_ಠ), laurelfulford, lkraav, Luke Carbis, Luke Gedeon, Luke Pettway, Maedah Batool, Maja Benke, Malae, Manzoor Wani, Marcin, Marcin Pietrzak, Marco Peralta, marcofernandes, Marcus Kazmierczak, marekhrabe, Marius Jensen, Mariyan Belchev, Mark Uraine, markcallen, Markus Echterhoff, Marty Helmick, marybaum, mattnyeus, mdwolinski, Meet Makadia, Mel Choyce, mheikkila, Micah Wood, michelleweber, Miguel Fonseca, Miguel Torres, Mikael Korpela, Mike Auteri, Mike Schinkel [WPLib Box project lead], Mike Schroder, Mike Selander, MikeNGarrett, Milan Dinić, mirka, Mobin Ghasempoor, Mohadese Ghasemi, Mohammed Saimon, Morten Rand-Hendriksen, Morteza Geransayeh, Muhammad Muhsin, Mukesh Panchal, Mustafa Uysal, mzorz, Nahid F. Mohit, Naoki Ohashi, Nate Allen, Ned Zimmerman, Neokazis Charalampos, Nick Cernis, Nick Diego, Nick Halsey, Nidhi Jain, Niels Lange, nielsdeblaauw, Nikolay Nikolov, Nilambar Sharma, ninio, notnownikki, pandelisz, paragoninitiativeenterprises, Pascal Birchler, Paul Bearne, Paul Biron, Pedro Mendonça, Peter Booker, Peter Wilson, pfiled, pilou69, Pranali Patel, Pratik K. Yadav, Presskopp, psealock, Rachel Cherry, Rahmon, Ramanan, Rami Yushuvaev, Ramiz Manked, ramonopoly, Riad Benguella, Rinat Khaziev, Robert Anderson, Rudy Susanto, Ryan Boren, Ryan Welcher, Saeed Fard, Sal Ferrarello, Samaneh Mirrajabi, Sami Keijonen, Samuel Elh, Santiago Garza, Sara Cope, saracup, sarah semark, Sebastian Pisula, Sekineh Ebrahimzadeh, Sergey Biryukov, SergioEstevao, sgastard, sharifkiberu, shazdeh, Shital Marakana, sky_76, Soren Wrede, Stephen Edgar, Steven Word, Subrata Sarkar, Sudar Muthu, Sudhir Yadav, szepe.viktor, Takayuki Miyauchi, Tammie Lister, Themonic, thomstark, Thorsten Frommen, Thrijith Thankachan, Tim Hedgefield, Tim Wright, Timothy Jacobs, timph, tmatsuur, tmdesigned, tmdesigned, Tobias Zimpel, TomHarrigan, Tor-Bjorn Fjellner, Toro_Unit (Hiroshi Urabe), torres126, Torsten Landsiedel, Towhidul Islam, Tracy Levesque, Umang Bhanvadia, Vaishali Panchal, WebFactory, Weston Ruter, William ‘Bahia’ Bay, William Earnhardt, williampatton, Willscrlt, Wolly aka Paolo Valenti, wrwrwr0, Yoav Farhi, Yui, and zebulan.

Also, many thanks to all of the community volunteers who contribute in the support forums. They answer questions from people across the world, whether they are using WordPress for the first time or since the first release. These releases are more successful for their efforts!

If you want learn more about volunteering with WordPress, check out Make WordPress or the core development blog.

Thanks for choosing WordPress!

Source

Taking Charge of Your Own PR Can Lead to More Business, and It’s Easy To Do With This 1 Trick

Taking Charge of Your Own PR Can Lead to More Business, and It’s Easy To Do With This 1 Trick

Public relations can seem out of reach for smaller or fledgling firms. However, PR as a way to raise your profile and that of your business is always a good idea.

If hiring a PR agency isn’t in your budget, it simply means you must do your own PR, and one way to do that is by creating your editorial content. You must, in one word, write. Write blog posts. Write and post articles to LinkedIn. It’s called owned content — as in you own it, so do it.

Of course, if you aren’t a writer this can seem daunting. How do you even get started creating your own content?

Here are four ideas for churning out blog posts or LinkedIn articles. Lately I’ve had to remind myself of them, because even professional writers can get out of the writing habit– although hopefully not for long.

1. Make writing a priority.

Put writing time on the calendar and hold yourself accountable for producing content. For this given time every day or every week you let yourself just write. Maybe you start out with a word goal or a time goal. You can stop as soon as you’ve hit 200 words or 15 minutes or whatever else you want.

By the way, if you’ve made it this far (thank you for that), you’ve read just over 200 words– more than a third of this column. Nobody’s suggesting you to write a novel.

2. Mine for ideas.

If you are lacking for ideas, read more. Maybe it’s general news or a trade magazine for your industry. Maybe it’s a memoir or a business book. Just read.

I recently resubscribed to the New Yorker magazine for a change of pace. Harvard Business Review has provided writing ideas for me and my clients. 

Reading sparks ideas — ideas for topics or how to turn a phrase. You should also peruse your social media feeds, especially LinkedIn, to find out what other professionals in your industry are sharing, writing and thinking about. Full-time writers have to do this all the time. 

3. Create an editorial calendar.

To make sure you always have ideas at the ready, plot them out in an editorial calendar. It’s a good way to organize a topic for every month or week, depending on your desired frequency for posting your articles. A natural place to start is to think seasonally.

For example, May marks National Small Business Week, Mother’s Day and graduation season. In June, you have Father’s Day, Pride Month and the start of Summer. Additionally, what conferences are happening or are you attending? What’s happening in your industry or at your company? Use these events to inspire content ideas.

4. Start with your headline.

Now that you have some topics you want to write about, think about how you want to structure your article. Think about your headline. If you’ve been mining for ideas then perhaps you have noticed which headlines pique your interest.

What was it about the headline that got you to read someone else’s story? Did it offer 10 things to know about a topic you wanted to know more about? Did it include the name of someone you admire? Did it offer answers to a problem you’ve pondered? Once you have your headline, you’re halfway there — figuratively speaking. Good job.

Bonus encouragement: When you are writing more regularly and know you have things to say, the writing gets easier. Your writing gets stronger, too. It’s called writing muscle for a reason.

Published on: Apr 17, 2019
More from Inc.
Sponsored Business ContentDianomi

via Inc.com

April 17, 2019 at 06:34AM

Default WordPress Image Sizes and How to add Custom Sizes

Default WordPress Image Sizes and How to add Custom Sizes

When you upload an image, WordPress does a lot of work behind-the-scenes so you can serve the image to your visitors. You can piggyback on this process and add custom image sizes to save yourself from having to resize images manually.

In this post, I’ll explain how and why WordPress creates different image sizes. Then I’ll teach you how to add your own image sizes by modifying the functions.php file, regenerate thumbnails and add your new image sizes to the Gutenberg image block and/or the WordPress loop.

WordPress Image Sizes Explained

Every time you upload an image into the WordPress media library, these are the additional image size options WordPress creates by default:

  • Thumbnail
  • Medium
  • Medium Large
  • Large

If your theme specifies additional image sizes, WordPress creates those as well.

WordPress also preserves the original size you upload and names it Full as in full-size.

You can see all of these (with the exception of Medium_Large) in the Gutenberg image block Image Size drop down when inserting an image into a page or post.

Why does WordPress create so many images?

Images are like pants. You want to make sure you get the right size. Pants and images that are too small look silly and it’s painfully obvious to you and everyone else that they don’t fit right. Too small images on your site will look stretched out or pixellated.

By contrast, if they’re too large, that’s super wasteful. You wouldn’t put a pair of pants made for a man on a baby, right? It’s so much extra fabric that isn’t even necessary. That baby is going to get lost in a pant leg 😉

Images are the same. If your image is too large for the container, you’re wasting bandwidth and time downloading it to serve on your page. And for what? For nothing.

Ideally, the full-size images you upload should be big enough to fit the largest image container on your site, but no larger. Then when you use images on your site, you should use the exact size image you need.

Since scaling images to create the right size in Photoshop or other image editor takes valuable time, WordPress takes on this task and does it for you. Thanks, WordPress!

All you need to do is choose the appropriate size when inserting an image into your site to get the performance benefits of using an image that is just right.

If the WordPress default image sizes aren’t perfectly sized for your theme, you can adjust the defaults in the Media > Settings section or add custom sizes so you’ll have more options to choose from.

Screenshot of WordPress Media settings
The WordPress default image sizes, except for medium_large which is hidden by default

The default image sizes are as follows:

  • 150px square for thumbnails
  • 300px width for medium images
  • 768px max width for medium_large images
  • 1024px max width for large images.

Medium_large was added to take advantage of responsive image support, which is why it isn’t included in the settings page. Speaking of responsive images…

Responsive Images

All of these images in various sizes serve another purpose, so you shouldn’t set the defaults to zero to keep WordPress from creating them, as some tutorials suggest.

WordPress added responsive images to core in version 4.4. Instead of populating image src attributes with the URL for just one image, WordPress also added srcset (set of sources) which is a list of URLs of images of various sizes.

Guess what images it uses to create that list? Yup, WordPress uses the same images at different sizes it creates when you upload an image.

It offers this list to the browser so it can select an image that is appropriate for the visitor’s device. If the visitor is using a mobile device, they’ll receive a smaller image in the srcset. If they’re visiting your site on a desktop Retina device, then they’ll receive the full-size Retina-ready image file you uploaded. Again, this is why you should upload an image big enough to fill that need.

When you add a custom image size, WordPress will add it to the srcset as long as it has the same aspect ratio. If the custom image size crops the image into a different shape then it will be omitted from the set.

WordPress Thumbnails and Featured Image Size

We’ve now reached the part of our tutorial where we will unravel the whole thumbnail/featured image mess. Basically, the problem boils down to this; because WordPress maintains backward compatibility as it evolves, the names of things change, but the functions still refer to things by their old names.

The WordPress Thumbnails image size was introduced in version 2.9 but was quickly changed to Featured Images in version 3.0, but alas, the name stuck. So you’ll often hear featured images referred to as thumbnails in tutorials and even in the function names.

Screenshot of Featured Image Metabox
If you don’t have the featured image meta box, paste add_theme_support( ‘post-thumbnails’ ); into your functions.php file

Here are some examples:

  • If your theme doesn’t have featured images and you want to enable that feature, you’ll add add_theme_support( 'post-thumbnails' ); to your functions file.
  • To display the WordPress featured image size in a theme, you’ll use the_post_thumbnail() function.

Thumbnails and featured images share a default size of 150px by 150px. If you use the_post_thumbnail() function without an argument to specify the size, it will use the default 150px square size.

To make this less confusing for yourself so you can actually use the right size, I suggest creating a custom image size and naming it featured-large or something similar. Then, when you want to use that image in you’re the loop, you’ll use the_post_thumbnail('featured-large').

Before You Start Creating Custom Image Sizes in WordPress

As you start creating custom image sizes, avoid going overboard and creating images for every conceivable purpose. Otherwise, you’ll burn through space on your hosting and if you’re using an image optimization service that charges you per image, you’re going to go through your image allowance a whole lot faster.

If your plan allows you to optimize 100 images but every upload generates 9 additional sizes that also need to be optimized, you’ll hit your limit once you upload 10 images. Keep this in mind when adding custom sizes and choosing image optimization plans.

Smush Pro doesn’t have image optimization limits and comes with a CDN so you can keep your server storage space clear. You’ll be able to add more custom image sizes than you normally would. Think of it as the equivalent of putting flowy MC Hammer pants instead of little skinny jeans on those babies because the fabric is cheap 🙂

Try Smush Pro free for 30 days.

How to Add Custom Image Sizes in WordPress

Here is the code we’re going to be adding to our functions file to add image sizes:

add_image_size( 'the-name-for-custom-image-size', 600, 400, true );

This function accepts 4 parameters in this order:

  1. The name you give your custom image size
  2. The image width in pixels
  3. The image height in pixels
  4. Should the image be cropped to fit the width and height you specified above

Cropping

The cropping parameter is a boolean, so you’ll use true or false. If you leave it out entirely, then it will default to false.

If you set the cropping parameter to true, then WordPress will crop your image to fit the dimensions you specify when it creates the custom image.

For example, if your custom image size is a 600px by 600px square and you set cropping to true, then if you upload a 600px by 800px rectangular image, 200px will get chopped off to make the image square.

add_image_size( 'custom-image-square', 600, 600, true );

Setting the cropping parameter to true is helpful for image sizes that have to be exact, like featured images or post archive images that have to fit a certain dimension perfectly.

For images that can have more wiggle room, such as the WordPress post image size and images on pages that tend to have variable heights and widths, then you can set cropping to false. This will resize the images, but it won’t change the shape of the image or cut off any pixels.

Take a look at our image SEO guide if you’re trying to drive traffic to your sites with your images.

Regenerating Thumbnails

One of the most important steps when either:

  1. modifying the WordPress default image sizes
  2. adding custom image sizes or
  3. switching over to a new theme that has different custom sizes

is regenerating thumbnails.

In this context, thumbnails refers to all the additional images WordPress creates, including the custom image sizes that are included in your theme and the ones that you create via your functions file.

When you make a change to the way that WordPress creates additional images, then it will only affect the images you upload going forward. It doesn’t update the images that are already in your media library.

To change the images you’ve already uploaded, you’ll have to use the popular Regenerate Thumbnails plugin.

After you install it, you’ll find it in the Tools section.

Screenshot regenerate thumbnails settings
Just push the button to create new image sizes

When you regenerate your thumbnails in your new sizes, you’ll have the option to delete old unused image sizes to free up server space.

How to Add Custom Image Sizes to the drop-down in the Gutenberg image block

You only need to add the code below to your functions file if you want your custom image sizes to appear in the drop-down in the Gutenberg image block. If you created a custom image size to use behind-the-scenes for your theme, you can skip this step.

Screenshot Gutenberg Image Block Sizes Dropdown
Here’s the custom image size I’m adding with the code below

We’re going to be hooking onto the image_size_names_choose filter.

In the array, I’ll add the name of the custom size that I specified in the add_image_size function and the name that I want to appear in the drop-down within the parentheses.

As I learned when doing this tutorial, you’ll have to regenerate thumbnails before the image appears in the drop down.

WordPress Add Image Size Full Code Snippet

Next, we’ll combine everything we learned into one code block with a real-world example.

Let’s say you want to add custom image sizes to your blog.

Here are the image sizes you want to add:

  • A 1600px by 400px featured image
  • An 800px size that spans the width of your blog’s content section

Since our theme doesn’t currently support featured images, we’ll start with that.

You’ll then see my custom sizes. Notice that I didn’t crop the images that are going to span the width of the blog content. I will hard crop my featured images since I want them to line up just right.

The only image I want to add to the Gutenberg drop down is the blog image since I’ll be using the WordPress featured image size in my theme.

After I add this code to my functions.php file, the next step is to regenerate thumbnails.

To use my custom featured image for my posts in the loop, I’ll add the following to single.php or index.php

See how I added 'featured-large' in the_post_thumbnail() function? That will display my featured image below my blog posts titles, above my content.

Custom Image Sizes Best Practices

Here are a few more tips so you don’t run into trouble creating custom images in WordPress.

  1. Always upload the largest file you can. If your image size is too small, WordPress won’t be able to create all the sizes it needs to serve your images properly on a variety of devices.
  2. If you need to resize the medium_large default size, use the update_option() function. You can use this same function to update any other WordPress default image size.
  3. If you’re outside the WordPress loop, you can use the function get_the_post_thumbnail() to use one of your custom images.
  4. Here’s more on soft cropping and hard cropping when creating custom images sizes in case you run into trouble.

That’s All There is to Adding Custom Image Sizes

Once you understand how custom image sizes in WordPress work, you can modify them to fit your needs and save a lot of time. Getting your image sizes right also helps you improve your site performance and search engine rankings, so it is an important thing to get right.

If you really want to take your image optimization to another level, check out Smush. We’ve added an amazing CDN to Smush Pro that has automatic image resizing, which will help you avoid dealing with modifying your functions file to add custom image sizes.

There are also other great image optimization features that come built-in, like lazy loading and converting images to next-gen formats. Try Smush Pro free for 30 days and see how the image optimization features can improve your site.

Related posts:

  1. How to Properly Resize and Serve Scaled Images with WordPress Serving scaled images is one of the most overlooked ways…
  2. Best Image Formats for Websites Compared! PNG, JPG, GIF, and WebP Image Optimization begins with choosing the best file format for…
  3. How to Make Retina-Ready Images That Don’t Slow Down WordPress The images on my site looked decent and loaded quickly….
  4. 6 Lazy Load Plugins to Make Your WordPress Site Faster Sites with a ton of images can take forever to…

WordPress

via WPMU DEV Blog

April 11, 2019 at 06:22AM

WordPress 5.2 Beta 3

WordPress 5.2 Beta 3

WordPress 5.2 Beta 3 is now available!

This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site to play with the new version.

There are two ways to test the latest WordPress 5.2 beta: try the WordPress Beta Tester plugin (you’ll want to select the “bleeding edge nightlies” option), or you can download the beta here (zip).

WordPress 5.2 is slated for release on April 30, and we need your help to get there! Thanks to the testing and feedback from everyone who tried beta 2, nearly 40 tickets have been closed since then. Here are the major changes and bug fixes:

  • The new Site Health feature has continued to be refined.
  • Plugins no longer update if a site is running an unsupported version of PHP (see #46613).
  • It’s now more apparent when a site is running in Recovery Mode (see #46608).
  • The distraction free button no longer breaks keyboard navigation in the Classic Editor (see #46640).
  • Assistive technologies do a better job of announcing admin bar sub menus (see #37513).
  • Subject lines in WordPress emails are now more consistent (see #37940).
  • Personal data exports now only show as completed when a user downloads their data (see #44644).
  • Plus more improvements to accessibility (see #35497 and #42853).

Minimum PHP Version Update

Important reminder: as of WordPress 5.2 beta 2, the minimum PHP version that WordPress will require is 5.6.20. If you’re running an older version of PHP, we highly recommend updating it now, before WordPress 5.2 is officially released.

Developer Notes

WordPress 5.2 has lots of refinements to polish the developer experience. To keep up, subscribe to the Make WordPress Core blog and pay special attention to the developers notes for updates on those and other changes that could affect your products.

How to Help

Do you speak a language other than English? Help us translate WordPress into more than 100 languages! The beta 3 release also marks the soft string freeze point of the 5.2 release schedule.

If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you! If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.


Would you look at that
each day brings release closer
test to be ready
.

WordPress

via News – – WordPress.org

April 12, 2019 at 02:42PM

Envato Launches Elements: The Biggest FREE Elementor Template Resource

Envato Launches Elements: The Biggest FREE Elementor Template Resource

With Elements, our users can enjoy access to an unimaginable and ever-growing number of templates and images, as well as other design assets which will be integrated into the editor in the future.

Envato is connecting their Envato Elements subscribers into this plugin, offering them a complete suite of everything a web professional might need to build a website.

With an Envato Elements subscription, you’ll have access over 1,000,000 assets across graphics, video, music, sound effects, fonts, and even courses and educational material.

WordPress

via Elementor Blog

April 11, 2019 at 03:09AM

WordPress 5.2 Beta 2

WordPress 5.2 Beta 2 is now available!

This software is still in development, so we don’t recommend you run it on a production site. Consider setting up a test site to play with the new version.

There are two ways to test the WordPress 5.2 beta: try the WordPress Beta Tester plugin (you’ll want to select the “bleeding edge nightlies” option), or you can download the beta here (zip).

WordPress 5.2 is slated for release on April 30, and we need your help to get there! Thanks to the testing and feedback from everyone who tried beta 1, nearly 100 tickets have been closed since then. Here are the major changes and bug fixes:

  • We’ve added support for Emoji 12! 🪂
  • A brand-new wp_body_open() template tag (and corresponding wp_body_open action) will let themes (and plugins!) add content right after the <body> is opened (#12563).
  • Superfluous paragraph tags will no longer incorrectly appear in dynamic block content (#45495).
  • The Site Health screens have received several bug fixes, tweaks, and performance improvements.
  • Crash Protection no longer interrupts plugin editing (#46045).
  • Custom error handlers now load correctly (#46069).

Minimum PHP Version Update

As of WordPress 5.2 beta 2, the minimum PHP version that WordPress will require is 5.6.20. If you’re running an older version of PHP, we highly recommend updating it now, before WordPress 5.2 is officially released.

Developer Notes

WordPress 5.2 has lots of refinements to polish the developer experience. To keep up, subscribe to the Make WordPress Core blog and pay special attention to the developers notes for updates on those and other changes that could affect your products.

How to Help

Do you speak a language other than English? Help us translate WordPress into more than 100 languages!

If you think you’ve found a bug, you can post to the Alpha/Beta area in the support forums. We’d love to hear from you! If you’re comfortable writing a reproducible bug report, file one on WordPress Trac, where you can also find a list of known bugs.


The wonderful thing
about betas, is betas
are wonderful things.
🐯

Source

ManageWP – Manage WordPress Sites from One Dashboard

ManageWP – Manage WordPress Sites from One Dashboard

Our sites use cookies and other tracking technologies to let us know how you interact with our services, to enrich your experience and the relevance of our advertising. This tool allows you to out out of such tracking. Note that blocking some types of cookies may impact your experience on our websites and the services we are able to offer.

via ManageWP

March 28, 2019 at 12:37PM

How to Create a WordPress Membership Site with MemberPress & Elementor

How to Create a WordPress Membership Site with MemberPress & Elementor

The easiest way is to choose one of them and customize it to your needs. However, you can also start completely from scratch.

Once you have made your choice, you have two possibilities to integrate the MemberPress login form:

  1. Use the shortcode for the login page via the Elementor Shortcode widget.
  2. Input the MemberPress Login widget from inside Elementor (you can find it under WordPress or via search).

Again, you only have limited styling options with Elementor directly, so you need to use the custom CSS settings for that again. Once satisfied, click Publish. No need to set conditions, triggers or rules.

Now, you need to make the popup show up on your page. One way to do that is to edit your header template to include a Login button somewhere.

When you have done so, access its settings, find Link, choose Dynamic and then Action > Popup. After that, click the wrench symbol, pick Open Popup and find the popup you just created by name at the bottom.

WordPress

via Elementor Blog

April 2, 2019 at 06:49AM