• Full Site Editing: Templates! With Pictures!

    We are back on our Full Site Editing (FSE) Series and we are back talking about templates again because I got confused with my own previous blog post ?

    Some of you might still not super clear on what template is all about, and why it matters on FSE. Now, we will touch a bit about WordPress FSE.

    Note: it’s not formally launched yet to all folks on WordPress.com. If you have WordPress.com Free to WordPress.com Premium plan website on WordPress.com and you still don’t see the option “Site Editor”, it means your website is not enrolled on the testing phase — and that’s okay! You can expect to see Site Editor (FSE) on January 2022 with the launch of WordPress 5.9.

    If you have WordPress.com Business plan or WordPress.com eCommerce plan on your website or you have self-host WordPress website and you don’t see Site Editor option, you can install the plugin WordPress.com Editing Toolkit (LINK) to activate Site Editor feature. If you prefer to wait for WordPress.com version, that’s okay too!

    To activate Site Editor/FSE on WordPress.com, you can find the option on Settings section.

    To access Site Editor/FSE on WordPress.com (make sure it’s activated first,) you can find the option on Appearance section.

    Again, please note the beta information. If you find issues or bugs related with FSE, or maybe product improvement request!, feel free to let Happiness Engineers know about it on help@wordpress.com.

    Template and FSE 101

    What is template? I love analogies, so imagine this:

    Think… An apartment unit, or a house. You might familiar with how folks show/display the apartment’s floor plan. There’s a living room, master bedroom, bathroom, and so on. That’s a template. You know each room’s function and you can customize how each room looks like. Just because your neighbor is using yellow sofa for their living room, does not mean you have to use a yellow sofa too. It’s your freedom to choose what goes into the template.

    Lets see this single.php template. As a refresher: single.php template is for single blog post, so you can expect something like this:

    single.php template

    We are focusing on content area first (I promise we will discuss more about header and footer). On the content area, you can see post title, post content, post date (the date where the post is published,) post category (the category of the post assigned to,) and post author.

    This used to be static. I have my fair share of having folks coming to live chat and asked, “hey, can I hide the post author? I don’t want my name to appear on the blog post,” or, “hello! Is it possible for me to move the arrangement? I want to have the post date on the top of the post title. Is it possible?”

    The answer for the first question is “yes. Using CSS code” — and not all folks are comfortable with CSS — and the answer for the second question is “no”. Well, if you are familiar with PHP and you have access to the PHP file (template file,) then yeaaaah, a bit, but in general, no. Trust me, I feel equally bad of saying it can’t be done/it’s really tricky to achieve that.

    See how discouraging it is?

    With FSE, you can move the elements. FSE takes the principal of Block Editor and make it possible for folks to move the elements around, just like building blocks, without having to be super well-versed in programming language (this is another reason why I’m so hyped about FSE. Hyped.)

    I’m going to show you a sneak peek of my single.php template.

    And yes! You can move it!

    HOW COOL IS THAT.

    Gone now the time where you are wondering how the hell we can move this post date so it will be under post content because now yes, you can! Oh, or perhaps you prefer NOT to have featured image visible on single blog post? REMOVE THE POST FEATURED IMAGE BLOCK, BABY! BOOM.

    Template Parts

    Next! Template parts! For this, I’m going to focus on the defaults: Header and Footer — mainly because these two are always visible/exists on every WordPress website. Rest assured, you can create more template parts. Template part is super nifty when you found you keep doing the same thing over and over again so instead of re-typing the code for the gazillionth time, you can enter the shortcut on the template you are working on.

    For example, with header area of the website. It usually has, minimum, three elements: Site Title, Site Tagline, and Navigation/Menu. Add it as a template and name it header.php. Then, you can add the header.php on another template, for example, page.php (for single page. Confused between post and page? Not to worry, you can check this Support guide: Post v. Page)

    Lets say you have… 15 templates on your website. All of them have footer area. Then, you realized that you have to change something on your footer area. Maybe the background color, from black to grey.

    Instead of changing it on every template (FIFTEEN OF THEM!), you only need to change it once on footer.php and all templates with footer.php on it will be updated too.

    You can use this principal for creating template parts: Footer, Header, Sidebar, and many more! Give it a try and explore!

    Up next, we are going to dive into WordPress Full Site Editing, the supporting themes, and its blocks. Again, I can’t promise when exactly I will publish it, but I will do so before the New Year.

  • Full Site Editing: Templates!

    Okay, as promised, this is one of the many from Full Site Editing series, excitedly coming to your nearest WordPress site in January for WordPress 5.9.

    I’m writing this because I personally feel FSE is something super major on WordPress and some of you might quite unsure on what it’s all about or maybe slightly weirded out about the whole thing (“we even haven’t recovered from Gutenberg/Block Editor, and now this?”)

    I hope this blog post/post series on FSE can help you to feel a bit at ease and give you a little boost of confidence to explore.

    Even though it’s really tempting to jump directly to Full Site Editing (FSE), I really want to cover WordPress and template — specifically: What is template?

    For this question, we need to look to WordPress Core — the software — or, as folks usually refer to: WordPress.org.

    WordPress is actually a software. A CMS: Content Management System. A software for folks to manage their website contents — creating a post or a page, categorize it, tag it, publish it, delete it, and so on. Aside from WordPress, there are other CMS softwares such as Joomla, Drupal, and many more.

    WordPress relies on themes. If there is no active theme on the website, you can expect to see WSOD (White Screen of Death)/blank page on your website. Inside the themes, there are: Templates.

    Template is a file that defines how a certain page displayed. In general, WordPress websites have the following templates:

    • single.php — a single post template, a.k.a. a template for a single blog post, for example, this one: https://corianderinpho.com/2021/12/16/state-of-the-word-2021/ — that link refers to a single blog post.
    • page.php — a single page template, a.k.a. a template for a, well, page. For example, this one: https://corianderinpho.com/works/
    • 404.php — a template for page 404/a page that only visible when you are looking for something that not exists on the website/Not Found page.
    • archive.php — a template for archive page. What is an archive page? Archive page is a page that generated to display a list of posts or pages based from category, tag, author, date, month, or post type. For example, this one: https://corianderinpho.com/category/inktober/ — That is the archive page for posts under category “Inktober”. This page, however: https://corianderinpho.com/archives/ — is a regular page titled “Archives”
    • … And many more. You can even create new templates if you want.

    There are some additional elements and we called it Templates Parts. Not exactly a template as a whole, but a template for a specific area on another template.

    These two are the most prominents:

    • header.php, and…
    • footer.php

    “Wait. What? Why?”

    Here’s the thing about WordPress and templates: You can create as many templates as you want, and you might find yourself typing the same code over and over again. For example, you want to create 10 templates for your theme: Page without title, page without sidebar, and so on. Imagine how tedious it can be to type the same code for the header area (the site title and the navigation menu) for ten times and more.

    This is where Template Parts come into play. For example, you are creating a template specifically for a page named, say, page-without-page-title.php and instead of typing the same code again and again for the header area, you only need to type:

    And what the get header(); will do is pulling everything from header.php to be displayed on the page-without-page-title.php template.

    You only need to design a template specifically for the header area, and any changes on header.php will affect all templates pulling header.php on its file. The same goes with footer.php — and other elements. For example, sidebar.php (yes, you can create one) and you can use sidebar.php on another template file. If you found yourself using a certain design over and over again on your theme, you can consider using template parts.

    For example, these are the templates for theme Twenty Nineteen:

    The PHP files in the red boxes are template files. Twenty Nineteen is one of the basic/starter templates so the templates are not a lot — but you can check some more advanced themes and you can find a lot more templates.

    For example, single.php template. How a single blog post looks like on theme Twenty Nineteen is different from the blog post on theme Twenty Twenty.

    This is how a blog post looks like on theme Twenty Nineteen:

    … And this is how it looks like on theme Twenty Twenty.

    Notice the differences, the colors, the text placement, and even how the featured image is displayed. Those elements are defined using templates. This is why some themes have sidebar, and some didn’t. All boils down to templates.

    “Okay. What it’s gotta do with Full Site Editing? Templates look really techie, I don’t know what PHP files are, and I’m not comfortable in tinkering with codes!”

    Now this is where FSE coming into — and why I’m mega excited about it:

    With FSE, you don’t have to have knowledge in coding on PHP language to create and edit your templates (and if you do have knowledge and comfort on doing PHP programming, that’s equally awesome!)

    With FSE, you can create your own template and edit the existing ones. You might notice the “Side Editor (Beta)” tab on your WordPress.com dashboard — and yep! That’s FSE!

    Please note, though, FSE is still really really new (it’s still in beta version) and you might find something not working or acting quite funky (I definitely had those moments!) If you do find something not quite right/not working as expected, or maybe you want to have a gut check with us, feel free to ring us up on e-mail help@wordpress.com or reach out to us on live chat (24 hours, Monday – Friday for Personal plan and Premium plan, Monday – Sunday for Business plan and eCommerce plan) here: https://wordpress.com/help/contact/

    I hope this helps a bit on sharing what template is all about! Our next post will be Introduction to FSE (… and, uhhh, I can’t promise you when I will publish it. I promise it will be before the New Year ?)

    Still confused about templates? I’m confused too! Check out the next post, still talking about WordPress template with pictures: Full Site Editing: Templates! With Pictures!

  • The Roost Time

    I wrote about this on my work’s weekly update a couple of weeks ago, and I’m thinking I can blog about it here too.

    In Animal Crossing game, there is a character named Brewster, a green pigeon, who’s running a café titled “The Roost”. This character and the café were finally introduced to Animal Crossing: New Horizons (we have a lot of Animal Crossing games out there) on its major update back in early November 2021.

    There is this… reward-system in Animal Crossing called “Nook Miles”. When you finished a task, you will be rewarded some amount of Nook Miles — and you can use Nook Miles to buy decorations or visit treasure/resources islands on the game. One of the tasks is: “Break time at The Roost” — meaning that you go to The Roost and order a cup of coffee from Brewster.

    One day, I played this game before bedtime, and since I got pressed with time (I have to finish digging dinosaur fossils and get them assessed so I can sell it for a nice sum of money at the store, and the store closed at 10 PM) I ran around the island to collect everything and cleaning out every fallen tree branch or pulled some wild weeds on the island.

    It’s just a game…

    Yes, and I found myself exhausted when I finished selling the dinosaur fossils. I decided to go to The Roost and to get my digital cup of coffee.

    This is not making any sense, yes, I know, and nothing makes any sense, so please bear with me ?

    (I once refused to have my character swimming in the ocean during last year’s winter because “IT’S SNOWING OUT THERE! IT’S COLD!” regardless of the fact that it’s a game.)

    When I visited The Roost, I just realized how calm and chill the environment is. It’s really quiet, with only Brewster around (sometimes you can find other villagers on the café too, but not always,) and some instrumental piano song plays softly.

    I sat down, ordered a cup of coffee (200 bells per cup), and enjoyed it.

    Then it hits me.

    I can have my own The Roost time. I can take a break between shifts, between my daily activities, to… I don’t know, a cup of tea, a cup of coffee, a cup of hot chocolate, even a tall glass of cold water. Just for a minute or two; not thinking about stuff.

    This is a marathon, not a sprint.

    And I hope, you have your The Roost time too. To sit down, take a minute to breathe, and know that you are doing really really well.

Nindya’s quick blurbs

  • A month too late, but I just stumbled upon IKEA France’s Tiktok video, hinting a possible collab with Animal Crossing. Unfortunately, no further information about this other than IGN picked up this news when the video was posted.

Latest snap