Featured

Template: Sticky

This is a sticky post.

There are a few things to verify:

  • The sticky post should be distinctly recognizable in some way in comparison to normal posts. You can style the .sticky class if you are using the post_class() function to generate your post classes, which is a best practice.
  • They should show at the very top of the blog index page, even though they could be several posts back chronologically.
  • They should still show up again in their chronologically correct postion in time, but without the sticky indicator.
  • If you have a plugin or widget that lists popular posts or comments, make sure that this sticky post is not always at the top of those lists unless it really is popular.

Responsive images demo: Extended srcset range

By request, this view shows the original responsive images example with an extended srcset range. Full srcset image width list breaks down as follows:

  • 300 pixels (default from WordPress)
  • 375 pixels (new in this example)
  • 768 pixels (default from WordPress)
  • 1024 pixels (default from WordPress)
  • 1125 pixels (new in this example)
  • 1920 pixels (new in this example)
  • 2304 pixels (new in this example)
  • 3380 pixels (new in this example)
  • 3840 pixels (new in this example)
  • 4032 pixels, uncompressed (original image file)

The rationale for these image sizes can be found in this GitHub issue discussing extended WordPress image sizes.

Image with no alignment

This image block has no alignment. Original image dimensions: 4048×2704.

Wide alignment image

This image block is set to “wide” alignment. Original image dimensions: 4048×2349.

Full alignment image

This image block is set to “full” alignment. Original image dimensions: 4032×2425.

Responsive Images demo: Corrected code

Note: Because of how the Twenty Nineteen theme defines widths, what image source is selected is influenced by both viewport width and screen resolution. In other words, a viewport width of 800px on a 2x monitor will be interpreted as 1600px. To run tests on 2x monitors, use the Firefox developer tools in mobile display mode where you can choose the display density manually.

In this post, the sizes attribute for each of the images has been manually altered to provide the browser with correct information about the displayed width of each image.

  • 5.0-RC1-43946
  • Twenty Nineteen as shipped
  • All images uploaded and added to an image block with no configurations beyond alignments (ie no changes to the “Image size” option

The sizes attribute on each image is set as follows:

Regular aligned image:
sizes="(min-width: 768px) calc(8 * (100vw / 12) - 28px), (min-width: 1168) calc(6 * 100vw/12) - 28px), calc(100% - (2 * 1rem))"

Wide aligned image:
sizes="(min-width: 768px) 80%, calc(100% - (2 * 1rem))"

Full aligned image:
sizes="100vw"

How this test works

After uploading the original images to the server, the generated images were downloaded, width information was added to a rectangle in the top corner, and the new versions were uploaded through FTP to replace the originals.

As the width of the viewport increases, the browser automatically pulls the appropriate sized source file from the srcset list for each image. This is controlled by the sizes attribute. The sizes attribute should describe the displayed width of the image at all viewport width to ensure the browser pulls the most appropriate source for any displayed width. In other words, if an image is displayed at 800px wide, the browser should pull the image source file with a width >=800px or as close as possible. In the case of WordPress, this would be the 1024px wide generated image if available.

How to conduct your own test

  1. Open an incognito window and activate the developer tools panel to block browser caching.
  2. Reduce the viewport width or use developer tools to create a small viewport width.
  3. Load the page.
  4. Note the “width” text displayed in the image. This will tell you which source file you are looking at.
  5. Increase the width of your viewport.
  6. Note the “width” text on the image changing as new image files are selected by the browser for wider viewports.

If responsive images work properly, the width of the source image used at any display width should match the actual displayed width of the image as close as possible. A mismatch means either a) the sizes attribute is incorrect, or b) the list of source files in the srcset attribute is insufficient.

Image with no alignment

This image block has no alignment. Original image dimensions: 4048×2704.

Wide alignment image

This image block is set to “wide” alignment. Original image dimensions: 4048×2349.

Full alignment image

This image block is set to “full” alignment. Original image dimensions: 4032×2425.

Responsive Images demo: Current generated code

Note: Because of how the Twenty Nineteen theme defines widths, what image source is selected is influenced by both viewport width and screen resolution. In other words, a viewport width of 800px on a 2x monitor will be interpreted as 1600px. To run tests on 2x monitors, use the Firefox developer tools in mobile display mode where you can choose the display density manually.

In this post, the markup is generated by WordPress on the fly.

  • 5.0-RC1-43946
  • Twenty Nineteen as shipped
  • All images uploaded and added to an image block with no configurations beyond alignments (ie no changes to the “Image size” option

The sizes attribute on all images is set by WordPress core to:
sizes="(max-width: 1024px) 100vw, 1024px"

How this test works

After uploading the original images to the server, the generated images were downloaded, width information was added to a rectangle in the top corner, and the new versions were uploaded through FTP to replace the originals.

As the width of the viewport increases, the browser automatically pulls the appropriate sized source file from the srcset list for each image. This is controlled by the sizes attribute. The sizes attribute should describe the displayed width of the image at all viewport width to ensure the browser pulls the most appropriate source for any displayed width. In other words, if an image is displayed at 800px wide, the browser should pull the image source file with a width >=800px or as close as possible. In the case of WordPress, this would be the 1024px wide generated image if available.

How to conduct your own test

  1. Open an incognito window and activate the developer tools panel to block browser caching.
  2. Reduce the viewport width or use developer tools to create a small viewport width.
  3. Load the page.
  4. Note the “width” text displayed in the image. This will tell you which source file you are looking at.
  5. Increase the width of your viewport.
  6. Note the “width” text on the image changing as new image files are selected by the browser for wider viewports.

If responsive images work properly, the width of the source image used at any display width should match the actual displayed width of the image as close as possible. A mismatch means either a) the sizes attribute is incorrect, or b) the list of source files in the srcset attribute is insufficient.

Image with no alignment

This image block has no alignment. Original image dimensions: 4048×2704.

Wide alignment image

This image block is set to “wide” alignment. Original image dimensions: 4048×2349.

Full alignment image

This image block is set to “full” alignment. Original image dimensions: 4032×2425.

Post-Gutenberg Image Post

This post features various images and image sizes including a gallery to test the download size of different setups. The post was created using the latest build of the Gutenberg plugin (as of Tuesday August 7 at 4:58pm PST) which includes the Responsive Images in galleries PR.

Note: All images are originally 1600px wide.Only default sizing and positioning is used to change appearance.

Full size image:

Bell on Wharf
Bell on wharf in San Francisco

Large size image:

Boardwalk
Boardwalk at Westport, WA

Medium size image:

Rain Ripples
Raindrop ripples on a pond

Thumbnail:

Sydney Harbor Bridge
Sydney Harbor Bridge

Pre-Gutenberg Image Post

This post features various images and image sizes including a gallery to test the download size of different setups. The post was created prior to installing the Gutenberg plugin.

Note: All images are originally 1600px wide. Only default sizing and positioning is used to change appearance.

Full size image:

Bell on Wharf
Bell on wharf in San Francisco

Large size image:

Boardwalk
Boardwalk at Westport, WA

Medium size image:

Rain Ripples
Raindrop ripples on a pond

Thumbnail size image:

Sydney Harbor Bridge
Sydney Harbor Bridge

Gallery:

WordPress Resources at SiteGround

WordPress is an award-winning web software, used by millions of webmasters worldwide for building their website or blog. SiteGround is proud to host this particular WordPress installation and provide users with multiple resources to facilitate the management of their WP websites:

Expert WordPress Hosting

SiteGround provides superior WordPress hosting focused on speed, security and customer service. We take care of WordPress sites security with unique server-level customizations, WP auto-updates, and daily backups. We make them faster by regularly upgrading our hardware, offering free CDN with Railgun and developing our SuperCacher that speeds sites up to 100 times! And last but not least, we provide real WordPress help 24/7! Learn more about SiteGround WordPress hosting

WordPress tutorial and knowledgebase articles

WordPress is considered an easy to work with software. Yet, if you are a beginner you might need some help, or you might be looking for tweaks that do not come naturally even to more advanced users. SiteGround WordPress tutorial includes installation and theme change instructions, management of WordPress plugins, manual upgrade and backup creation, and more. If you are looking for a more rare setup or modification, you may visit SiteGround Knowledgebase.

Free WordPress themes

SiteGround experts not only develop various solutions for WordPress sites, but also create unique designs that you could download for free. SiteGround WordPress themes are easy to customize for the particular use of the webmaster.

Markup: HTML Tags and Formatting

Headings

Header one

Header two

Header three

Header four

Header five
Header six

Blockquotes

Single line blockquote:

Stay hungry. Stay foolish.

Multi line blockquote with a cite reference:

The HTML <blockquote> Element (or HTML Block Quotation Element) indicates that the enclosed text is an extended quotation. Usually, this is rendered visually by indentation (see Notes for how to change it). A URL for the source of the quotation may be given using the cite attribute, while a text representation of the source can be given using the <cite> element.

multiple contributors – MDN HTML element reference – blockquote

Tables

Employee Salary
John Doe $1 Because that’s all Steve Jobs needed for a salary.
Jane Doe $100K For all the blogging she does.
Fred Bloggs $100M Pictures are worth a thousand words, right? So Jane x 1,000.
Jane Bloggs $100B With hair like that?! Enough said…

Definition Lists

Definition List Title
Definition list division.
Startup
A startup company or startup is a company or temporary organization designed to search for a repeatable and scalable business model.
#dowork
Coined by Rob Dyrdek and his personal body guard Christopher “Big Black” Boykins, “Do Work” works as a self motivator, to motivating your friends.
Do It Live
I’ll let Bill O’Reilly will explain this one.

Unordered Lists (Nested)

  • List item one
    • List item one
      • List item one
      • List item two
      • List item three
      • List item four
    • List item two
    • List item three
    • List item four
  • List item two
  • List item three
  • List item four

Ordered List (Nested)

  1. List item one -start at 8
    1. List item one
      1. List item one -reversed attribute
      2. List item two
      3. List item three
      4. List item four
    2. List item two
    3. List item three
    4. List item four
  2. List item two
  3. List item three
  4. List item four

HTML Tags

These supported tags come from the WordPress.com code FAQ.

Address Tag

1 Infinite Loop
Cupertino, CA 95014
United States

Anchor Tag (aka. Link)

This is an example of a link.

Abbreviation Tag

The abbreviation srsly stands for “seriously”.

Acronym Tag (deprecated in HTML5)

The acronym ftw stands for “for the win”.

Big Tag (deprecated in HTML5)

These tests are a big deal, but this tag is no longer supported in HTML5.

Cite Tag

“Code is poetry.” —Automattic

Code Tag

This tag styles blocks of code.
.post-title {
margin: 0 0 5px;
font-weight: bold;
font-size: 38px;
line-height: 1.2;
and here's a line of some really, really, really, really long text, just to see how it is handled and to find out how it overflows;
}

You will learn later on in these tests that word-wrap: break-word;will be your best friend.

Delete Tag

This tag will let you strike out text, but this tag is recommended supported in HTML5 (use the <s> instead).

Emphasize Tag

The emphasize tag should italicize text.

Horizontal Rule Tag


This sentence is following a <hr /> tag.

Insert Tag

This tag should denote inserted text.

Keyboard Tag

This scarcely known tag emulates keyboard text, which is usually styled like the <code> tag.

Preformatted Tag

This tag is for preserving whitespace as typed, such as in poetry or ASCII art.

The Road Not Taken

Robert Frost Two roads diverged in a yellow wood, And sorry I could not travel both (\_/) And be one traveler, long I stood (='.'=) And looked down one as far as I could (")_(") To where it bent in the undergrowth; Then took the other, as just as fair, And having perhaps the better claim, |\_/| Because it was grassy and wanted wear; / @ @ \ Though as for that the passing there ( > º < ) Had worn them really about the same, `>>x<<´ / O \ And both that morning equally lay In leaves no step had trodden black. Oh, I kept the first for another day! Yet knowing how way leads on to way, I doubted if I should ever come back. I shall be telling this with a sigh Somewhere ages and ages hence: Two roads diverged in a wood, and I— I took the one less traveled by, And that has made all the difference. and here's a line of some really, really, really, really long text, just to see how it is handled and to find out how it overflows;

Quote Tag for short, inline quotes

Developers, developers, developers... --Steve Ballmer

Strike Tag (deprecated in HTML5) and S Tag

This tag shows strike-through text.

Small Tag

This tag shows smaller text.

Strong Tag

This tag shows bold text.

Subscript Tag

Getting our science styling on with H2O, which should push the "2" down.

Superscript Tag

Still sticking with science and Albert Einstein's E = MC2, which should lift the 2 up.

Teletype Tag (obsolete in HTML5)

This rarely used tag emulates teletype text, which is usually styled like the <code> tag.

Underline Tag deprecated in HTML 4, re-introduced in HTML5 with other semantics

This tag shows underlined text.

Variable Tag

This allows you to denote variables.

Markup: Image Alignment

Welcome to image alignment! The best way to demonstrate the ebb and flow of the various image positioning options is to nestle them snuggly among an ocean of words. Grab a paddle and let’s get started.

On the topic of alignment, it should be noted that users can choose from the options of None, Left, Right, and Center. In addition, they also get the options of Thumbnail, Medium, Large & Fullsize.

Image Alignment 580x300

The image above happens to be centered.

Image Alignment 150x150The rest of this paragraph is filler for the sake of seeing the text wrap around the 150×150 image, which is left aligned.

As you can see the should be some space above, below, and to the right of the image. The text should not be creeping on the image. Creeping is just not right. Images need breathing room too. Let them speak like you words. Let them do their jobs without any hassle from the text. In about one more sentence here, we’ll see that the text moves from the right of the image down below the image in seamless transition. Again, letting the do it’s thang. Mission accomplished!

And now for a massively large image. It also has no alignment.

Image Alignment 1200x400

The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content.

Image Alignment 300x200

And now we’re going to shift things to the right align. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there… Hey guy! Way to rock that right side. I don’t care what the left aligned image says, you look great. Don’t let anyone else tell you differently.

In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah… Just like that. It never felt so good to be right.

And just when you thought we were done, we’re going to do them all over again with captions!

Image Alignment 580x300
Look at 580×300 getting some caption love.

The image above happens to be centered. The caption also has a link in it, just to see if it does anything funky.

Image Alignment 150x150
Itty-bitty caption.

The rest of this paragraph is filler for the sake of seeing the text wrap around the 150×150 image, which is left aligned.

As you can see the should be some space above, below, and to the right of the image. The text should not be creeping on the image. Creeping is just not right. Images need breathing room too. Let them speak like you words. Let them do their jobs without any hassle from the text. In about one more sentence here, we’ll see that the text moves from the right of the image down below the image in seamless transition. Again, letting the do it’s thang. Mission accomplished!

And now for a massively large image. It also has no alignment.

Image Alignment 1200x400
Massive image comment for your eyeballs.

The image above, though 1200px wide, should not overflow the content area. It should remain contained with no visible disruption to the flow of content.

Image Alignment 300x200
Feels good to be right all the time.

And now we’re going to shift things to the right align. Again, there should be plenty of room above, below, and to the left of the image. Just look at him there… Hey guy! Way to rock that right side. I don’t care what the left aligned image says, you look great. Don’t let anyone else tell you differently.

In just a bit here, you should see the text start to wrap below the right aligned image and settle in nicely. There should still be plenty of room and everything should be sitting pretty. Yeah… Just like that. It never felt so good to be right.

And that’s a wrap, yo! You survived the tumultuous waters of alignment. Image alignment achievement unlocked! One last thing: The last item in this post’s content is a thumbnail floated right. Make sure any elements after the content are clearing properly.

Markup: Text Alignment

Default

This is a paragraph. It should not have any alignment of any kind. It should just flow like you would normally expect. Nothing fancy. Just straight up text, free flowing, with love. Completely neutral and not picking a side or sitting on the fence. It just is. It just freaking is. It likes where it is. It does not feel compelled to pick a side. Leave him be. It will just be better that way. Trust me.

Left Align

This is a paragraph. It is left aligned. Because of this, it is a bit more liberal in it’s views. It’s favorite color is green. Left align tends to be more eco-friendly, but it provides no concrete evidence that it really is. Even though it likes share the wealth evenly, it leaves the equal distribution up to justified alignment.

Center Align

This is a paragraph. It is center aligned. Center is, but nature, a fence sitter. A flip flopper. It has a difficult time making up its mind. It wants to pick a side. Really, it does. It has the best intentions, but it tends to complicate matters more than help. The best you can do is try to win it over and hope for the best. I hear center align does take bribes.

Right Align

This is a paragraph. It is right aligned. It is a bit more conservative in it’s views. It’s prefers to not be told what to do or how to do it. Right align totally owns a slew of guns and loves to head to the range for some practice. Which is cool and all. I mean, it’s a pretty good shot from at least four or five football fields away. Dead on. So boss.

Justify Align

This is a paragraph. It is justify aligned. It gets really mad when people associate it with Justin Timberlake. Typically, justified is pretty straight laced. It likes everything to be in it’s place and not all cattywampus like the rest of the aligns. I am not saying that makes it better than the rest of the aligns, but it does tend to put off more of an elitist attitude.