Author: Robert

  • GutenTour: JetFormBuilder Block Collection by CrocoBlock

    I’ve headed out on a world tour of Gutenberg blocks. Third-party blocks. There are starting to be quite a few of them out there, sometimes singly, sometimes in groups of layout and design-related blocks. Especially for the groups of them, you’ve typically got to pony up a few bucks to license them.

    But one I ran across—JetformBuilder—is both free (though there’s a pro version for $39 (unlimited sites for $79) per year) and a nice example of how blocks let you go about some kinds of page creation in rather different ways. Experimentation ensued.

    The product is made by Crocoblock, which I only recently learned is a Ukrainian company. They have continued to run the company (even make product updates) from the basements where they are taking shelter. I don’t want to shill the product, but on the other hand I can imagine you could do a lot worse in supporting these Ukrainians directly by purchasing a license or two (and I think you’ll get your money’s worth, too, but Sláva Ukrayíni!).

    Forms with blocks

    The easiest way to explain JetFormBuilder, I think, is to just call it a block-native version of more traditional third-party WordPress forms packages like WPForms. You create a form and then you can embed it in your posts by way of a JetFormBuilder block with a dropdown that lets you select the form you want to appear.

    What’s different is that you create the form within the block editor as well. There’s a custom post type for forms, the difference being that when you publish a form post, it’s just saved. Each field is a block. When you want to embed the form in a page, you use a block to place one of your previously created CPT forms.

    What makes JetFormBuilder especially interesting is that it gives you a bunch of options you don’t generally get with the free versions of other forms packages. For one thing, you can store your form entries on the site (WPForms makes you upgrade if you want more than an email of the filled form). You can add multiple actions on form submission without upgrading.

    You can create multiple-page forms. You can create fields that display calculated values. Indeed, that last bit means that you can create calculator-style tools for site users that aren’t possible in a typical WordPress forms package.

    Let’s base a little calculator project on a block that allows you to hide or display fields on a form based on previously entered values.

    Before we do that, let me just say that I’m not going to use this article to dig into what extras you get if you pay for the license. It’s a fairly long list of things and, if there’s interest, we can dig into that on another occasion.

    Dog years

    All right, project time. I want to create a calculator that allows people to determine their dog’s age in human years.

    As you know, no one can ever quite remember how many years you’re supposed to multiply the dog’s age by. Is it 3 years? Is it 7 years?

    If it were, say, 3 years, then you could have a form field for the dog’s age, then a calculated field that multiplied the age field by 3. That’s trivially easy to do in JetFormBuilder.

    Alas, I think the reason no one can ever remember what to multiply by is that, well, that’s not actually how it works, at least according to the American Kennel Club, which uses this chart:

    Table that shows human-year equivalent for a dog’s age.

    Yeah, so people years are harder to come up with than simply multiplying by a number. We have to take the size of the dog into account. Of course it’s easy enough to ask what that is, but the real problem is that this chart doesn’t move in predictable increments. Giant dogs age slower in human years the first couple of years, then age faster than other dogs. The other three sizes age 15 years in year one, then 9 in year 2, then 4 years for each of the next 3 years.

    If this is unclear, spend a couple minutes with the chart trying to derive a rule for how to convert years to human years–you’ll see what I mean.

    Since the human age varies on a cell-by-cell basis, you need a table-driven way to retrieve and spit out the answer. You can imagine loading an array and then using two form fields to determine the right indexes into the array.

    But there are no arrays in block forms. You can’t do this the easy way.

    Thing is, even if it’s not straightforward, it’s at least possible. Color me impressed. Not one line of code gets written, and you wind up with a calculator that follows some wonky, non-mathematical rules.

    Now you see it

    My approach hinged on the conditional container block that JetFormBuilder includes, the one I mentioned above, which is visible (or not) depending on some other field’s value. I include several such containers, each containing a single field: a radio button selection of the dog’s size.

    Which version of the size selection radio button you see is determined by which age you input. There are a bunch of different ones, but you only see the one corresponding to the age you entered and all the rest of them are hidden.

    For the radio button you do see, there’s a value associated with each of the options. In other words, there’s the label or text you see, like “Giant,” but there’s also a value attribute, and I set the value for each option for a given age at the appropriate number for the size of dog.

    In other words, if you say your dog is two years old, you see the two-year-old version of the radio button field. In that version, the value for the Giant dog selection is set to 22 and the other sizes are set to 24 (these come from the American Kennel Club’s chart).

    Elsewhere in the form, I have a calculated form that simply takes the value associated with the selected radio button. So if you said your dog was 2 years old and then selected Giant, the number 22 is displayed in the calculated field. (In other words, in this case it isn’t really calculating anything, it’s just pulling in a value from another field and leaving it be.)

    Effectively, each different version of the radio button field functions as one row of an array of year equivalents. It’s a little clunky, but when you work with it on the page, it’s shockingly clean because you aren’t aware of any of the multiple versions of the radio buttons that you don’t see.

    I suspect you can do this sort of tomfoolery and come up with all sorts of ways to get real-world worksheets and calculators to work, which I find very intriguing. So, just by way of showing that it does in fact work, here’s a rudimentary version of the form that only handles years 1-4 (I got tired of duplicating the conditional radio-button blocks–indeed, it’s a bit of a kludgy hack as far as making a calculator goes, but it does work and, to be sure, something that was actually calculated rather than looked up in a table would be a fair bit more straightforward).

    [jet_fb_form form_id=”223750″ submit_type=”reload” required_mark=”*” fields_layout=”column” enable_progress=”” fields_label_tag=”div” load_nonce=”render”]

    Progressive

    My initial thought was that the conditional field capability could be used to perform another bit of magic: progressive form fills.

    A progressive form fill is a process whereby you only bother a site user for a piece or two of new information per visit, but you ask different questions each time around and eventually you have a fully filled form.

    The first time a user shows up, for instance, you might ask for nothing more than a first name and email. If you were implementing this from scratch, you’d probably tie the process to a cookie on the user’s system, but in this case let’s assume the return user logs in (or, perhaps, stays logged in because of a cookie).

    Let’s say there’s a private page each user is redirected to as they log in. There’s a form embedded in that page and what the user sees is something like “Welcome back – can we just ask two quick questions?” and then the two next questions.

    I was wrong about Jetformbuilder being able to do this, though, and I mention it because the underlying reason is worth thinking about. Like other form packages, here we have form definitions (which happen to be made out of blocks) and then, as a user submits a form, the data is written to a row in a table of entries.

    This is what you’d expect, but it means that, in the normal course of things, each time the form is filled, it’s a brand-new entry. As a nice extra, it actually is possible to prefill some limited information from the user account (like the user’s name) into a form, just to speed up the form filling process for users. But each entry is still filled de novo.

    This is what you’d expect—I’m not knocking the plugin for being set up this way—but it’s interesting to contrast this to the way that data attributes in blocks are natively handled.

    Let’s say I create a custom block that has an HTML form embedded in it (by way of React createElement calls). When you add that block to a page within the back-end editor, you’ll see a form. If you’ve set up the block to save the attributes you’ve associated with your form fields, then when you update the page, the data in the fields will be stored. Next time you come back, the data will be there. Additionally, you can use this saved data as part of what’s displayed on the public-facing page.

    To take an obvious example, you could create a company address block that the page creator could fill in with an address when they added it to a page. When people viewed the page with the block in it, they’d see the address.

    I’m spelling this all out because I want to point out that, should you happen to use this address block on some other page you’ve created, the address you entered before will not be there. The address data within your custom address block is stored with the instance of the block that’s within the individual post you’ve created.

    Block data, unless you do something to make it work differently, works like custom fields within posts. Each post has different data. Indeed, you can build applications by treating each individual post as a record within a database table. (And of course that’s what the core of a post actually is: a row in a SQL database table.)

    I think that blocks that do things and that store things are going to be where the really interesting developments in WordPress will be found in the next couple of years. JetformBuilder is interesting because it lets you build forms, and you get a lot of value even within the free version. But it’s probably just the tip of the iceberg as we move forward.

  • Creating Your Canva Ebook

    Let’s talk about Canva, shall we? It’s a brilliant execution of an online service that caters to the world of people (like me, maybe like you, too) who aren’t professional designers but who need things that look reasonably good, that look like they were designed by a competent, if not necessarily downright brilliant designer. You can even make a Canva ebook, amazingly enough.

    That’s what Canva does. It makes it dead simple to make good, basic images and graphics by just dragging stuff around. It doesn’t do most of the stuff that a sophisticated design tool does, but what it does, it does in a way that comes out looking right.

    It’s great for throwing together logos and the like. Nearly every image on PeakZebra was, at least at time of writing, created with Canva (if you hate ‘em, blame me, not Canva).

    It’s also a great way to create an ebook, the whole thing, soup to nuts.

    So let’s talk about ways in which that’s great, and ways in which it may come up short in certain ways and how you might use the good stuff from the Canva design but maybe move a step or two beyond in terms of what your ebook offers.

    Step One: Have a book

    In this piece, I’m not writing about how you go about producing the copy that will go into your book. Presumably you know more or less what you want to say and you can find a way to get it said. Let’s assume that. I’m assuming you’ve wound up with something like a Word or Google document with all that good writing in it.

    Step Two: Make some early design decisions

    Personally, I don’t think you should completely wing your design process, though I’ll have confess that I have, on occasion, done exactly that.

    What I’d recommend, though, is having a little back and forth “conversation” with yourself, on the one hand looking at ebooks and book covers on line, and on the other hand thinking about the style elements you’d like to incorporate, irrespective of any of the finished designs you’re looking at.

    By style elements, I mean:

    • Color palette
    • Font choices
    • Illustration style
    • Page designs

    First get a sense of all these elements and some things you’ve seen and liked, then we’ll take the elements on in the next several steps.

    Step Three: Color Palette

    If you’re not a designer and haven’t spent some time actually learning about color, playing with color, and talking to colors in a little language that only colors can understand, I’d recommend borrowing a palette wholesale.

    Oh, and I’d recommend having color, in general. Print books are often black and white on the inside, but your Canva ebook doesn’t have to be. If you’re trying to recreate the experience of reading a print novel, then fine, black and white (actually, very dark gray looks more professional, just as an aside) is fine. But otherwise, get some colors going and not just on the cover.

    Places to borrow palettes from include just about any professional software that offers palette choices. But why add extra work when Canva offers kind of an amazing amount of help on this, beginning with a freaking huge list/display of palettes.

    For kicks, let’s use a palette they call “muted succulents” for examples in this article. Here’s what it looks like:

    By way of quick confession: Despite all the praise I heaped on Canva earlier, I don’t think the way Canva handles palettes is remotely intuitive. But whatever. The point is to find colors that work together well and use them for all your design elements.

    Step 4: Fonts

    Honestly, mere mortals should generally not pick font groupings. And for an ebook, you want only two or three fonts. So find some options that have been chosen by a designer who does this for a living and use those. Generally, if you use sans-serif for headings, you want something in the serif family for the body. Vice-versa is also fine, but most people are accustomed to reading serif fonts in the body of books, if that makes a difference to you.

    Step 5: Illustration Style

    The mark of a professionally designed book is that, if it has illustrations, those illustrations all look like they belong to the same thing. If you have charts, don’t mix radically different looks for those charts. If you are going to use illustrations that are the sort of semi-abstract people illustrations that are so overused on websites these days, things that look like this…

    Then stick to that sort of illustration throughout.

    This is an area where Canva can really shine, by the way, because generally if they have one element drawn in a particular style, they’ll have a whole set of elements drawn in the same style. And they have lots of the style I was just talking about:

    There's abundant corporate-look art for your Canva ebook.

    Step 6: Page Design

    OK, now we get to what the actual pages look like. Here again, I think there is little point in reinventing the wheel.

    It’s possible to do an entire short Canva ebook (I wouldn’t suggesting doing anything much over a dozen pages without using a more page-design oriented tool in addition to Canva) and the service offers some very good looking templates.

    With a Canva template, each page is essentially a separate graphic image you’re creating. When you’re done, all the separate pages are saved as a single PDF. It’s a clean, simple approach, but there are some downsides that should be mentioned:

    • It’s a PDF, not individual web pages. So one read of the PDF won’t result in many page views, if you care about that.
    • It’s a PDF, but there’s no way to create links from page to page within the document, so you can’t, for instance, create an interactive Table of Contents. This is probably OK in a short document (which, in fact, may not even need a ToC).
    • You can’t “flow” text across pages in the document. With a heavier-caliber page design tool, you can create text boxes on your pages that are linked from one box to the next. This is handy because you can just dump the contents of the main text into the first box and it will continue into the following linked boxes automatically. It makes later edits to the text hugely simpler to handle in the laid-out text because they just reflow.

    Step 7: Using Other Tools for a Canva ebook

    For longer ebooks especially, you’ll probably want to involve tools that more specifically address managing long-form text. And you’ll have to decide whether to use PDF as your format, or handle it as a series of web pages. PeakZebra has experimented with web formats that act more like books, support gated access, and run on WordPress installations (example here).

    But even when using other tools, Canva is still a fantastic resource for graphic design elements and illustrations you’re incorporating into the work. So, hat tip to Canva, useful for all sorts of things, but useful for ebooks, too.

  • Toward web3 Marketing

    Supposing you are a startup in the blockchain space… How can you do a genuine web3 thing around your presence and your marketing? What does it mean to communicate in a “web3 way?”

    Here are some thoughts, still a bit random, but “experiments are ongoing”…

    1. Probably better launch a coin of some kind. Unless your business is creating the mechanics of blockchains, you’ll want to do this on a sidechain, either your own or as part of Solana (which seems like the current leader, but of course that could change), or tied back to the Ethereum chain. Some people are referring to these sorts of alt-coins as “creator coins.” With a coin, you can both earn and pay out with a private universe that, with luck, is expanding. This means you earn more and more while being able to pay less for more and more. If someone tells you this sounds like a bubble, look them straight in the eye and tell them they don’t get it. Any of it.
    2. Or give away fractions of well-known (Bitcoin, Ether, Solana) coins in exchange for people learning about your product. This is actually the piece I find most interesting at the moment as far as genuine web3 marketing goes. If a person creates a Coinbase account (not something I necessarily recommend, because Coinbase seems unnecessarily pricey to me), they get offers to go through a few pages of what amounts to actual coursework in exchange for, say, five dollars worth of Bitcoin. There are a number of these sorts of offers—Coinbase has effectively created an alternative sort of advertising market here. I’d love to see some startup create this sort of marketplace more directly, though tying it to a wallet/exchange like Coinbase also makes a certain inherent sense. With or without Coinbase, though, the direct exchange of cryptocurrency for serious engagement (including quizzes to make sure you got the message before you get your coin) seems like an approach that may not be available forever. Right now, five bucks worth of Bitcoin somehow seems worth a whole lot more than “just five bucks” to the crypto enthusiast. And this could be done with any alluring alt-coin, including coins that basically weren’t worth much. You know, here’s 10,000 shiba inu (Sounds like a lot? It’s 33 cents USD) for your high-level attention.
    3. You would think that with all the hype there would be a way to build a website using web3. But if you go googling for how to build a web3 website, you’ll get articles on visual design, letting you know that in the web3 world, crazy background gradients rule.

      I don’t know anything about him except that a page turned up as I was rooting around for how to build a genuinely web3 site, but I’m with Tim:

    Indeed, if you were capable of cleaning your mind of specific memories, specifically, let’s say you could do grep -l web3 brain | xargs rm. And then someone asked you how you’d envision a blockchain-based and smart-contract-enabled web3; you’d likely describe an ecosystem vastly different to what it is today. You’d think about peer-2-peer networks, light clients, and renewed web standards. That’s precisely not web3.

    In today’s experience it will instead be mostly shitty react websites that crash or stop working when you’ve neglected to install Metamask (or other key-management plugins). Opening a web3 website’s network console, you’ll see that it’s making an excessive amount of RPC request to an Ethereum full node. Sorry, I meant to say Infura node, a hugely-popular cloud provider hosting Ethereum full nodes. That’s kinda stupid.

    4. Double down on content marketing. Strangely, I think the big marketing discovery of web 2.0—SEO—remains the primary tool for marketing in the web3 world as it stands today. Content marketing is web3 marketing.

    I don’t mean manipulative, bullshit SEO. In fact, I think bullshit SEO (aka black-hat SEO, but I used to work at a security conference called Black Hat and I never liked the SEO tried to repurpose the phrase) is completely played out. The win is in providing excellent content that people link to because it’s the best out there. Because they link to it, the search engine indexers gradually become aware that more and more traffic is hitting your content from backlinks at sites around the web and “aura” around your content becomes increasingly visible. Your rankings improve. Over time—it’s a long game strategy.

    5. Find a way to tie into the wild enthusiasm. I get it that what I’m saying here is pretty vague. But the background thinking is simply that right now, people who are interested in web3 are really interested. They are looking for the new stuff, talking to each other about the new stuff, holding Twitter spaces about the new stuff. So if you can manage to be a small part of the new stuff, people will actively encourage your thing being discovered. This is unlike almost every other market, even in tech, where people generally aren’t eager to believe you have anything new, doubt its important if you do, and generally don’t want you to bother them.

    But what’s new in a context where everything is new? Here, you’re going to have to be inventive and actually come up with something new. But note that the newness can come from more than one source. Newness can be present when:

    • What your startup does is new, like a new way to tie physical goods to NFTs.
    • The way your startup does it is new, like a food supplier that has adopted blockchain in a novel way to track inventory.
    • The way you market it is new, like you create a DAO to handle your company communications (though there have been several DAOs of note where the DAO is the whole organization, as far as I’m aware no one has said, hey, let’s form a DAO to spread the word about what we’re doing and let DAO owners control the message and make sure its content is genuinely useful. Is this a good idea? I couldn’t say. But you get the idea.) If there’s a DAO tied to your marketing, then even if you don’t quite know what the hell’s going on, it’s still web3 marketing.

    6. Spend some money. I think your money spent on sponsoring events and giving away swag goes far, far further in blockchain than it could ever hope to in, say, cybersecurity. People who go to NFT events are positively desperate to be covered in blinking LED lights. People at cryptocurrency events want cool black challenge tokens and they like free drinks as much as the next industry’s conference attendees. The show up at work wearing tshirts, so if yours is cool, it will actually get worn in situations where people seeing it matters.

    Does anything about this create a new form of marketing? Not yet. But we’ll keep an eye out for that as well, won’t we? After all, cryptocoins hold the promise of direct reward for small increments of a person’s attention (as in point 2 above). So there may well be interesting alternatives we haven’t thought of just yet.

  • A WordPress Client Dashboard

    Just to be clear right up front, this is not an article about customizing the back-end dashboard that WordPress provides to system administrators. This is an article that captures my journey in creating a WordPress client dashboard to show various kinds of statistical progress to PeakZebra clients. These folks don’t care how many page views the PeakZebra.com site is getting. They care about monitoring how things are going in their consulting engagement with me.

    When someone becomes a PeakZebra client, typically they are working on a content marketing project. As often as not, they’ve been browbeaten about how important SEO could be to them and they feel a little guilty about not having done much of anything about it.

    So the first useful thing PeakZebra can provide them is a specific plan for content and for whatever SEO benefits we think might be realistically achieved in the coming year (the world is filled with people who wildly overpromise what can typically be achieved with SEO, but that’s an article for another day).

    That plan is stored on PZ, accessible only to them through their client login. Additionally, I want clients to be able to see how things are going month over month. And my experience has been that almost all the details I care about in SEO program execution are things they simply do not have time or energy to be bothered with. So I need to show how things are going and do it sticking only to the most useful metrics, showing them in a visual format that makes them very quick to digest.

    What I need, in other words, is a WordPress client dashboard. You know, green light if things are good and let’s hope the light is never any other color than green.

    This turns out to be relatively simple to achieve, but maybe not quite as simple as you’d think. Today’s article brings you the gory details of the first pass I took at this, working within the context of the Divi page builder for WordPress. In a follow up coming in the next few days, I’ll walk through the path I took after I decided I needed better graphic and table tools, which then meant I didn’t really want to use Divi because I was happy with the look without it.

    Easy-does-it WordPress Client Dashboard

    To make things easy, at least initially, I decided that the dashboard wouldn’t directly query data in realtime. Rather, there would be tables on the site that were periodically updated, and it’s the data from the tables that winds up displayed in the dashboard.

    Second, I absolutely needed to prevent a client’s dashboard from being visible to anyone but the client and myself (and authorized contributing team members). I wanted to keep that simple as well, about which more toward the end.

    One final thing for simplicity’s sake the first time around: I’m just going to make each client’s dashboard a regular WordPress page. That way the dashboard pages are just ordinary pages, meaning I can throw in whatever page components I like (assuming we’re using Gutenberg or a page builder like Divi).

    This isn’t really how I think this should be done. Rather, the “real” way to do this is to create a custom post type, probably called “dashboard,” with each client having a post of that type. That’s by no means complicated, but we’ll hold off for now.

    Data

    In order to show the data, we need a plugin that, ahem, turns data into pretty charts. And I want to stress here: if you’re bothering with charts, pretty is almost certainly a hugely important part of the deal. We want pretty.

    There are a bunch of plugins out there that will take data and spit out charts. The popular page builders that web designers often use with WordPress these days also have at least some elements that lend themselves to showing data, which is what sent me down this initial route to have a look at what the Divi builder (the one I have the most experience with) could do.

    Mixed results, honestly. To be sure, I can build a Divi dashboard that looks pretty darned good. But I did have to hunt down a couple of extra tools to get it done.

    All by itself, you can’t do much that looks “dashboard-y” in Divi. It will let you show numbers as a single bar, as you see here:

    You get as much satisfaction out as you put effort in.

    And you can throw in animated circles with numbers in the middle of them, of the sort that you’ve seen on a million landing pages:

    It’s almost the answer to the universe.

    Honestly, I think they both look nicely professional, but we’re going to need some more stuff, goodles like bar charts and spider graphs and maybe color-coded maps.

    Send in the Charts

    In fact, you can get these in Divi by investing less than ten bucks (assuming you already have a Divi license, which is a larger expense) in an add on available through the Divi Marketplace. In the interest of responsible journalism, I picked this up and gave it a whirl:

    Peace is the thing with feathers.

    In addition to this line chart, there are six other chart types—all basic stuff like pie charts—and each of the chart types has some degree of animation and interactiveness, such as popups that show the values on the line as you hover over them. You can flip the chart into several different predefined palettes, or override the CSS to set your own colors, or go with monochrome.

    It’s actually not bad, except for one thing… Putting the data in is a bit clunky, in that you bring up the properties box for the graph and then input comma separated values for each data plot. It’s not terrible for something with a dozen data points, but you’re not going to want to do anything big or fancy with this.

    The only way to update the data is to go back into the properties and hand edit (or paste over) the data. This seems like a deal killer for many sorts of projects, where you’d like to suck up a spreadsheet in one go, or maybe query a REST API for the latest data.

    If you need something that’s very top-level and that you can just edit now and then as the need arises, you could build a pretty professional-looking dashboard with this.

    This won’t help you if you need to place tabular data somewhere in your dashboard, of course. For that, the simple answer (with or without Divi being involved) is the TablePress plugin.

    I like TablePress. It’s a robust, simple tool. You can get the data you want from a .csv or Excel file (and from a couple other source types as well), suck it up to your WordPress site, where it’s assigned a shortcode, then embed the shortcode in the page where you’d like it to appear. The results look pretty decent as long as you don’t have too many columns. Too many columns makes for a complete mess.

    You can embed a shortcode directly into a Divi page, no problem, and that includes TablePress charts.

    If the table you get from TablePress by itself, though, isn’t dressy enough to suit you, it’s possible to add in an additional plugin called TablePress Styler, sold at Divi creator’s ElegantThemes.com website for $35. I haven’t really dug into it, but I suspect that most of the things that TablePress Styler does are done simply by manipulating the CSS associated with classes that are set up in TablePress itself. Meaning you could do lots of the styling yourself for free.

    But TablePress Styler makes short work of making a table look quite fancy, no question. If you’re going this route, I’d recommend it.

    Except…you might want to handle your tables with the Visualizer plugin, which will give you both charts and basic table capabilities. The free version gives you six chart types; popping for a $99 “personal” license gets you an additional nine chart types, email support, and periodic synchronization with either .csv files or JSON endpoints (full pricing information is here).

    This last part—the data sync-ups—strikes me as the thing that might make it worth a hundred bucks. If you set it up using this feature, you can update your underlying spreadsheets and not worry about the dashboard keeping up, because it will do that on its own.

    By this point, though, the bulk of the dashboard is being supplied by plugins that have nothing to do with Divi. So whether you bother with Divi (or Elementor, or any other page building tool) really comes down to how much control you want over the design of whatever else is on the page, whether you want fly-in graphics or accordions with icons that rotate as the sections are revealed and all that other “fancy professional design” stuff.

    By the time you get the charting and table plugins involved, it’s kind of an incidental detail that the page was made in Divi. Indeed, the argument could be made that Divi isn’t really doing all that much here. If you get the sense that I’m about to abandon the Divi approach, you’re probably right.

    So, yes, to be clear: I by no means want to imply that Divi is the way to do a dashboard. Truth be told, Divi can be pretty quirky (though it can also produce beautiful WordPress results) and there’s some question about which of the WordPress builders will survive the introduction of blocks as the essential design element of WordPress running natively (which, roughly speaking, makes WordPress itself a page builder).

    To get the same sorts of graphs I discussed up above, you can use any of a number of WordPress plugins, some of which provide block support. A walkthrough of this approach is coming in a week or so.

    And, yes, I did say I’d talk about gating access to the dashboards so that only the client can see that client’s dashboard. The short answer is that you can do it using the PublishPress Permissions plugin. There’s also another approach with fewer moving parts—next time…

  • A Solidity Definition

    If you’re keeping an eye on Blockchain, you may have run across mentions of “solidity” as part of discussions of the Ethereum blockchain, and in particular alongside discussion of smart contracts. Any solidity definition is going to lead you straight into the topic of smart contracts and this post is no exception.

    The smart contract concept was always part of Ethereum, but Solidity as a programming language in which to create those contracts dates back to 2014, when it was proposed by British software developer Gavin Wood. Work on realizing the proposal was carried out by Wood along with contributors including Christian Reitwiessner, Alex Beregszaszi, Liana Husikyan and Yoichi Hirai.

    Solidity is now one of several options, including Serpent, Viper and Mutan, for programming on the Ethereum blockchain, which functions as a sort of ‘global computer.’ As a computer, Ethereum runs low-level instructions on the Ethereum Virtual Machine (EVM). All of these languages compile to bytecode that is native to the EVM.

    While Solidity was originally conceived as a programming tool for the Ethereum blockchain, it runs in other blockchain environments as well, including:

    By design, Solidity bears a strong resemblance to ECMAScript (the latest version of JavaScript) and, by extension, languages derived from C. The language uses strong typing and supports object oriented programming, including class inheritance.

    Solidity enables you to write applications that are written to the Ethereum blockchain. These applications implement self-enforcing contractual agreements (that is, “smart” contracts). In a smart contract, funds and assets are automatically controlled and distributed based on parties to the agreement meeting specific conditions.

    The primary benefit of such smart contracts is that business transactions can be carried out without a third-party mediation of the terms. If a payment must be made before a digital asset is released to a party to the agreement, for example, the contract itself can verify that cryptocurrency has been transferred to the contract and then automatically release the asset. Smart contracts can also be used to control minting of new creator coins within sidechains according to demand and price stability, meaning that prices can’t be manipulated by the creator supported by the creator coin once the contract controls are in place.

  • Is Cybersecurity One Word or Two?

    Is Cybersecurity One Word Or Two?

    Cyber attacks and cyber attackers figure in mainstream news nearly every day. With this level of exposure, it starts to matter whether you know how to spell things. When it comes to cybersecurity, the answer is that it’s one word, even though other, related terms—like the ‘cyber attacks’ above—are still two words.

    Having been a professional writer and editor my entire life, plus a security news editor for twenty of those years, the question of how to spell this has long been on my mind.

    Just say no

    Early on, back in the late 1990s, the answer, at least among professionals in the field, was easy: don’t use that word. We preferred “computer security” or “information security.” Occasionally, assuming it really had something to do with the web, it was acceptable to use ‘web security.’

    But the field was a lot smaller then. Less attention was paid.

    By now, the field is booming. The U.S. Bureau of Labor Statistics says positions for cybersecurity analysts will grow at 32% over the next several years—this compared to an average economy wide job growth rate of 5% (these figures are pre-pandemic, so we’ll see).

    WordPress Cybersecurity: It’s a Thing

    Nowadays, with PeakZebra, the questions I get are largely about whether WordPress is secure. The short answer is: yes, it’s secure. The longer, more-accurate answer is that it’s really easy to make it horribly insecure. And it’s easy to do that without even realizing it.

    The thing is, this is true of lots of other ways that people build websites and web applications. The real trick is knowing what it takes to achieve some decent degree of cybersecurity in your own environment.

    In WordPress, the two cardinal rules are:

    1. Keep your WordPress site up to date. Set both your core WordPress install and your plugins and themes to update automatically.
    2. Be careful about which plugins and themes you install. Use popular ones with thousands of installations when possible. Otherwise, make sure you know who created the plugin, whether there are reasons you can feel confident they know how to write secure plugins, and so on. It’s not as hard as it might sound, really.
    3. Use WordPress as part of a SaaS offering. PeakZebra is an example, but only one of many. Learn more about PeakZebra starting on our home page, if you like.

    Cybersecurity? it’s one word or two. Really.

    Though there are still plenty of places that prefer “cyber security,” it does seem like there’s increasing convergence on “cybersecurity,” at least among vendors and professional organizations within the space. On the other hand, there are more Google searches each month for “cyber security” than there are searches for “cybersecurity.”

    My own view is to use the one-word option. It is, after all, a single (broad) concept. And “cyber” has historically been used as a prefix—consider one of the earliest modern uses, the word “cybernaut.”

    There’s no particular reason my preference should matter to you, so rest easy in the knowledge that, for now at least, either way is ok. Just be consistent, though, yeah?

  • A Book Table of Contents in an eBook World

    If you publish a long-form content piece on the web, you really owe it to your readers to provide navigational help. That seems obvious, but most things online that call themselves books (just one way of singling out long-form material) don’t go very far out of their way. If there’s any plain-old book table of contents, odds are it’s static or offers only chapter heading links. The web could stand to do a little better.

    This article makes a start at thinking it through: what are the options for what, in the physical world, might be called the “table of contents.”

    The final section of this piece also includes an overview of one approach to creating a book-like structure in WordPress and giving it a table of contents (though it’s built manually). With this approach, adding a ToC-specific menu for the book is trivial, if not entirely satisfactory.

    Mind you, a book table of contents—that thing that, in English-language books, comes in the front before the actual content material—is only one navigation tool that can be provided in print books. There’s also, in nonfiction works, the index, which is just a much finer-grained table of contents that’s been sorted into alphabetical order.

    Chapter summaries fall into the navigation category and occur even in fiction, though most often in older works, such as this example from Dickens:

    Chapter 38: Mr. Samuel Weller, Being Entrusted With a Mission of Love, Proceeds to Execute it; With What Success Will Hereinafter Appear

    Charles Dickens

    Even the sidebar, beloved of textbooks, is a sort of navigational aid, in that it clearly signals that the material in the sidebar is incidental to the main flow of the text and could, if one were in a rush, be skipped for now.

    In some instances, footnotes, too, are navigational, pointing to other sections of the book (what you might call “internal links”) or pointing to other works (“external links”).

    But the main option is the table of contents, and that’s where we’ll spend most of our time in this piece. As a side note, never forget that your table of contents is another small element in your ebook marketing plan — people skim ToC’s to get a sense of whether the content suits their needs.

    The Blog List as a Book Table of Contents

    If you think of a blog in its entirety as a long-form work (which I don’t, but it’s a useful place to start), the reverse chronological listing of posts that appears on the top of the blog is as much ToC as you get.

    It’s a terrible ToC and I think the reasons are fairly obvious: it doesn’t generally provide any sense of topical organization or how things fit together. It’s also generally designed so that the individual entries take up a lot of space, such that you have to click through lots of pages to get to things that didn’t appear quite recently.

    Reflecting about what’s missing gives us a couple ideas about what makes a good online ToC. First, a ToC ideally conveys the internal structure of the work. Is there a first part that’s theoretical and a second part that’s about practical application? Great. Then the ToC should convey this. Second, it does this in a way that gives access to at least the top-level hierarchy of the work in one view. Readers should be able to move through the ToC without clicking through multiple places.

    One fantastic additional element to an online ToC, as opposed to a print book, is that it should be available on every page in the work, and easily consulted without unintentionally losing one’s current place.

    The PDF’s lost opportunity

    We won’t linger on this, but it’s worth mentioning in passing that most PDF “eBooks” are a terrific example of how not to do this sort of thing. (And there’s a good argument that you shouldn’t be using PDFs for this stuff anyway…)

    Because of the PDF’s heritage as a format that preserves the look and feel of printed pages, it’s not unusual to see a conventional print-style ToC at the front of one.

    Even though it’s possible to make the text on these ToCs link to the pages they point to, as often as not, PDF designers don’t bother with this extra step.

    Without putting too fine a point on it, this is missing the point of being online.

    We won’t linger on the PDF, but one thing that is interesting is the way some readers will show some documents with thumbnail page images down one margin, so that you can jump to a specific page and have some general idea what that page looks like. In some formats, this means you can easily identify the starting pages of chapters. In works that have substantially different designs on different pages, you may even be able to jump directly to a page. It’s a nice touch and something that simply isn’t possible in print.

    The eBook Table of Contents

    Whereas print books tend to have a page that contains little more than the title and author of the book, this feels a little performative in an online work. In an online work, it seems better to have the title and author combined either with cover art or with the ToC, just depending on the style or nature (fiction or non-fiction, for instance) of the book.

    In longer web pages, one sees a sort of “proto-ToC” that shows, typically, the subheadings on the page and allows for a direct jump to those locations.

    There are starting to be Gutenberg blocks that provide this sort of ToC functionality as well:

    Nothing wrong with it, but nothing to write home about either…

    Way in the back of my head I feel like there used to be natively in WordPress to make sequential book pages instead of chronological posts, but in the past couple of days, I’ve poked around the internet looking for this option in vain. I think it vanished from disuse and, best I can recall, it was pretty clunky. But I do think there might have been a rudimentary ToC capability included with it.

    As far as I know, that was the only plugin-oriented ToC device for handling lots of sections and pages in a sequential order.

    Needless to say, you can of course build a page that looks and acts exactly like a table of contents, just making all the links to the pages by hand.

    Rolling Your Own

    To build a book (and that book’s table of contents) within your website, first create a custom post type that represents the pages of your book. You can do this by creating a plugin that looks like this:

    // call our custom function with the init hook
    add_action( 'init', 'pz_register_cpts' );
    
     // custom function to register a "publication" post type
    function pz_register_cpts() {
    	register_post_type( 'publication',
    	array(
    		'labels' => array(
    			'name' => __( 'Publications' ),
    			'singular_name' => __( 'Publication' ),
    			'add_new_item' => __('Add New Publication'),
    		),
    	'public' => true,
    	'has_archive' => true,
        'show_in_rest' => true,
       'supports' => array('title','editor'),
    
    	)
        );
    
        // and bookpage CPT
        register_post_type( 'bookpage',
            array(
                'labels' => array(
            		'name' => __( 'BookPage' ),
    				'singular_name' => __( 'BookPage' )
    			),
    		'public' => true,
    		'has_archive' => true,
            'show_in_rest' => true,
    		)
    	);
    
        // and book jacket type
        register_post_type( 'jacket',
    	array(
    		'labels' => array(
    			'name' => __( 'Jackets' ),
    			'singular_name' => __( 'Jacket' ),
    			'add_new_item' => __('Add New Jacket'),
    		),
    	'public' => true,
    	'has_archive' => true,
        'show_in_rest' => true,
    
    	)
        );
    }

    Then, use the ‘Post Sort Order’ plugin to give yourself the capability to drag your custom page posts into the correct reading order.

    Note the “correct” order will very probably be the reverse of what WordPress will do, left to its own devices, unless you add the pages of your book to WordPress from back to front (not recommended).

    One thing you’ll very probably want is navigational aids on each page. You want to be able to go from the current page to the next one, or perhaps go in reverse. Ideally, you should also be able to jump forward and back from one chapter start to the next.

    As you know, WordPress themes quite frequently offer navigation from one post to the next. The source of these navigation links is, almost always, the template page for the particular style. If you’re familiar with how themes are built and how they use template pages, this is something you’ve already run across, but perhaps not paid a lot of attention to, because it lends itself to cutting and pasting.

    If this isn’t familiar territory, not to worry. This is the perview of WordPress developers and this article isn’t the place to delve in detail into how this particular bit of functionality is coded. Suffice it to say, though, it’s doable and you can see an example of this over in the marketing guide I’ve published on this site: Found and Followed.

    That same book has a dropdown menu on every page that gives you a basic ToC. It works fine, I guess, but it’s certainly easy to imagine better, and better looking, ToCs.

    It’s be nice, for instance, to have the subheadings within chapters accordion into view when the cursor hovered over a chapter title. Likewise, it’d be nice to offer thumbnail page previews as the cursor hovered over a subsection. This approach would just plain be better than the original book table of contents.

    How hard would it be to make this sort of thing available as, say, a plugin within WordPress, or a library in one of the React-based front-end environments.

    One wouldn’t expect the technical bar to be set too high, because what we’re talking about is just a variant on the basic menu pattern. Consider this option in the Divi page builder ecosystem for a so-called ‘mega menu’ dropdown with featured images.

    It’s not a ToC, but it’s easy to see how, with page thumbnails and a further dropdown from chapters to subheaders within chapters, the same basic paradigm would make an attractive navigation tool.

    But I have to say, I don’t think I’ve ever come across anything quite like a really well-done menu for a long-form work online.

  • Ebook Marketing in 2022

    There’s more than one reason why you might want to write an eBook. You might want to establish yourself as an authority on a subject. You might want to sell copies of the eBook, though be forewarned that it’s not necessarily easy to sell conventional eBooks. Finally (and most likely), you’re looking into eBook creation because you’d like the eBook to serve as part of your content marketing program, thus making the book a lead generation tool. No matter why you put your magnum opus together, you’re going to need to deploy some ebook marketing if you’re going to get your work an audience.

    Without eBook marketing, you’re not going to lead people to discover and make use of your work. In fact, even if you are using it in order to market some other thing—that is, your primary product or service—you’re going to need to get word out about the book.

    So here, based on PeakZebra’s experience in producing its own eBooks and in working with clients to make eBooks part of their content marketing efforts, is a straight-up, no-frills roadmap for pushing your eBook out into the world.

    The Six-Step eBook Marketing Program

    Step One: Include Key People and Companies in the Book as You Write It

    This is just silly obvious, but the book will get a lot of help from other people if you mention them and what they do in your book. Every situation and book is different, but if you can get a vendor, say, who has a Twitter account with a big following to mention the book (because they feature in it), that could very well be a great deal more reach than you can muster on your own.

    Don’t pander, don’t put people in there just for this purpose (that can backfire), but on the other hand, never fail to mention relevant people and companies in your eBook—then make sure they are aware of the book as it’s coming out. Send them an email with a link; direct message them on Twitter. If the book is being sold rather than made freely available, make sure they get a free copy, ideally in advance of the release.

    Step Two: Change your email signature.

    It sounds trivial, yes, but the underlying point is broad and more important that it might seem: you need to mention your book in anything you can. You should make sure people know about the book at every touchpoint they have with you, up to and including mundane things like your email signature.

    Make it simple and unobtrusive, but make sure it’s there, something like:

    Robert Richardson
    phone: 555-555-5555
    myemail@somewhere
    twitter: @peakzebra
    Just Out: Found and Followed: etc.

    3. Get Your Social Media House in Order

    Just as your email signature should be updated, your Twitter and Facebook banners should be updated, ideally with a picture of the cover. Don’t push the book in any way, just make sure that people know from looking at the banner that the book exists, should they be interested in it.

    Then, analyze your reach on whatever social media channels you use and focus on the one that seems most likely to help you. When you first release the book, make some noise in that venue. Offer tidbits of goodness from the book, use images in your posts, and tag people and companies mentioned in the book so that they’ll see you’re talking about them in social media.

    4. Get Backlinks. And Have a look at ViralContentBee and PayWithaTweet.

    Backlinks are when you get other sites to link to your site or your eBook. Generally, you get these by very politely asking for them at sites and on pages where it would absolutely make sense to make mention of your work. One effective (but time consuming) approach is to find pages with dead links to content that seems like it might have been similar to yours. Let the webmaster know that the current link on their page is dead and offer your site as a possible alternative.

    This approach isn’t for everybody or for every situation, but some folks get pretty good mileage from these two sites/services. I haven’t tried PayWithaTweet yet, but it seems like it might be particularly useful for creating some viral push for an eBook, as offering a full book will make the “tweet payment” more palatable to those who would otherwise resist cluttering their feeds. I think this could be particularly true if you tone down the messaging in the tweet you want them to send to something like “Just discovered PeakZebra’s new eBook, Found and Followed”.

    ViralContentBee is the sort of thing I’m normally wary of–you shill other people’s content in return for them shilling yours–but there are things about this particular version of it that make it seem less objectionable. For one thing, you don’t have to shill other people’s stuff, and there’s lots of content to look at and recommend, so you might well find things you’re perfectly happy to recommend. Second, there really are people out there who report having fairly good luck with it.

    5. Guest Blog on Other Relevant Sites

    There are lots of articles out there on this tactic, so I won’t dig into here, but obviously this gets you in front of an established audience. Just don’t sell from the stage.

    7. Spend Some Money on PPC

    There are so many articles out there on the web about going viral for free, but the fact is, it’s a vanishingly small percentage of the people who _want_ to go viral who actually do. The way to hedge your chances for success is to put ads out there on Google search results. Pick your keywords wisely so that they tend toward lower per-click costs and set your daily budget to something small as you gain some experience, but if you can’t reel people in and get them to read your eBook with PPC, then you’re probably going to have to change things up significantly, because the magic just isn’t there for this eBook with this particular messaging.

    Make that Funnel Top as Big as Possible

    A final thought: if you’re using eBook downloads as a way to build up a prospect list, just remember that only a fraction of the eBook downloaders will decide to buy your product or service. And the eBook downloaders will be a small fraction of those who become aware of your eBook. So in order for the math to work out, you need to get in front of lots of potential downloaders. You also need to do it affordably enough that whatever money the small percentage of these folks who actually convert send your way is more than enough to cover the cost of the whole eBook project.

  • Blockchain in WordPress in 2022

    If you land in certain corners of the Twittersphere, you’ll find yourself surrounded by people who are wildly enthusiastic believers in the power of NFTs (non-fungible tokens) to change the relationship between creators and consumers.

    By extension, they are at least a little enthusiastic about cryptocurrency as a means to an end, though they are quick to point out that they aren’t at all like the real crypto enthusiasts, who just want to get stupid rich by purchasing lots of Bitcoin and other blockchain currencies and then “hodling” it forever (that is, holding it).

    There’s also a great deal of interest and activity around the underlying blockchain technology that makes NFTs and hodling possible, though there’s maybe a little less wild fervor. So is it time to bring blockchain to WordPress?

    Probably nothing

    These folks are probably onto something, even if the sheer enthusiasm and the whiff of naivete is a little off-putting. The slang (like saying “probably nothing” as an ironic way of saying that some NFT development is likely to be huge, but whose importance is overlooked by the public at large) can get old. But in any case, on to something. It’s just an open question whether what they are on to is the same thing as whatever it is that will ultimately wind up mattering. Indeed, there are some interesting things that a business (whether a solo creator or something bigger and more traditional) could potentially do with blockchain technology and something like either minted coins or NFTs.

    For some, there’s a real opportunity there, so the pressing question becomes: what’s the shortest distance from whatever I’m doing on the web now and offering some sort of blockchain capability?

    There’s a reasonable likelihood that you are running your website on WordPress, meaning that the question will ideally boil down to installing a blockchain plugin or two. As we know, plugins can be magic.

    But before having a look at the current assortment of “early phase” plugins that handle various blockchain-related tasks, let’s talk about why you’d want to get your WordPress site tangled up in the cryptocurrency world and what you’d actually be trying to get done.

    Blockchain Potential Benefits

    If you’re running a “non-crypto” website or business (and this is most of us), you may be wondering why you should even bother with blockchain and cryptocurrency.

    Crypto Payments

    One answer may be that you have enough cryptocurrency users in your customer base or target demographic that it makes sense to accept payments in Bitcoin and/or Ethereum.

    NFT sales

    A fancier possibility is creating NFTs of some sort and selling them to the NFT collectors out there (of which there are surprisingly many). I don’t know if any of the NFT fervor, especially around JPEG art, makes any sense, but in a way it doesn’t matter. People want these sorts of things and the prices paid for them are occasionally staggering. Plus, depending on what you are doing and how novel it is, this may be a form of getting your name out there (that is, marketing) while the interest level is insanely high.

    To create NFTs, you need to create the data (the picture, the text) that will be the “contents” of the NFT, which is just the normal process of creating such things. But after that, you’ll need to either mint the NFTs yourself or provide a way for buyers to mint them as they buy them.

    Creator Coins

    Elsewhere in the world of tokens, there are interesting experiments underway with what are being called “creator coins” or “community coins.”

    You can mint NFTs, as mentioned above, but you can also mint tokens that are “alt-coins.” They are cryptocurrency that’s built on top of other cryptocurrency, by way over oversimplifying.

    When I was talking about creator coins a couple of weeks ago, I singled out Rally as a startup that was leading in building out this kind of alt-coin production:

    Dogecoin is the alt-coin people talk about, mostly in a sort of disbelief that there’s such a thing as joke-but-real money. But Rally envisions spinning up lots and lots and lots of alt-coins, one per creator/entrepreneur. Because Rally is an Ethereum sidechain, the coins are actually tied back to a currency system that in turn ties back to what most of us still (archaic fiat-currency boomers that we are) think of as real money.

    I think it’s fair to say that we’re still figuring out what it means to launch your own creator coin, but the underlying thinking is that this gives you a way to have a self-contained economy in the community that supports you. People buy your tokens as a way of supporting your work (think, approximately, Patreon, but with crypto). You as the creator at the center of this economy can reward fans for contributing their time or feedback or enthusiasm using the coin of the realm. And holders of the coins will, in most instances, receive whatever it is you’re creating, on a scale commensurate with how many coins they hold.

    If this sounds vague, that’s because the whole thing is still vague, but we’re seeing early experiments in using these sorts of tokens as event tickets, as access to community sites, and a way to buy a book that keeps you “invested” in the community going forward.

    Rally’s raison d’être is making it easy and seamless to create your own coin. But that’s not at all to say you couldn’t roll your own, using an Ethereum sidechain like Solana (this sidechain has the low “gas” costs you’d need if you were minting a lot of coins). If you do that, though, you’ll need an interface for doing the minting, need to connect that minting process to a wallet that supported Solana, then need a mechanism for making a small, private market for the coin.

    There are code libraries out there for doing all these things. There’s even a few sites emerging that are doing these sorts of things on WordPress sites. Web3WP.com, for example, lets you mint a one-off version of the WordPress mascot Wapuu, should you be overtaken by any desire to do that. More broadly, it seems likely that creator coins may be one of the more interesting places to consider blockchain in WordPress environments.

    WordPress blockchain plugins

    There are already over a hundred blockchain-related plugins in the WordPress.org plugin repository, though only a handful have more than one or two hundred active installations out there in the world. There are also a growing number of plugins available outside the official repo.

    As you’d expect, some of these various plugins are fairly arcane. One provides a websocket attachment to the Executium network, for example (40+ installations).

    Others do the sorts of things you might be interested in doing to get your feet wet. The NFT Maker by Tatum (see below) plugin let’s you…yeah. And you get your choice of the Ethereum, Polygon, Binance Smart Chain, Celo, and Harmony chains.

    So here’s a few plugins of note:

    Crypto Price Widgets

    Dip a toe into crypto by providing basic price information on your site. Crypto Price Widgets – CryptoWP displays the current prices of various coins in one of over twenty supported currencies. You can throw this widget into a sidebar or use shortcodes to drop prices into pages anywhere at all.

    LikeCoin

    From the plugin description: “LikeCoin aims to empower content ownership, authenticity, and provenance. Creators can register content metadata to guarantee its integrity by acquiring an International Standard Content Number (ISCN). ISCN is a tool to authenticate and track content, just like a digital footprint.”

    This is one PeakZebra will dig into in more detail in the next few weeks, as there’s a lot of interesting stuff lurking in this approach.

    Tatum – NFT Maker

    If you want to dive into making and selling NFTs, this seems like the most straightforward path. You can mint tokens and sell them on the site, though you can’t let users mint the NFTs themselves, a capability that some sites are using. The reason for this exclusion, I suspect, is the Tatum plugin’s business model. The plugin is free, but you’ve got to buy credits to pay for the gas transaction fees that arise in the process. And heads up: if you’re minting on the Ethereum main chain, the gas fees can be very high.

    Crypto.com Pay Checkout for WooCommerce

    Exactly what it sounds like. It accepts several currencies, including the obvious Bitcoin and Ether options.

    WordProof Timestamp

    WordProof does pretty much exactly what it sounds like it does, creating a hash of your latest post and writing it to the Ethereum blockchain, thus providing proof for the long run that you published exactly that version of the post on exactly that day and at that time. This may not be something you think you need (and you may be right), but one scenario is intriguing. If you’re a smaller website and you publish something wonderful, but a big site steals your piece and throws it up online right behind you, that site might actually get indexed by Google faster than you (sites with more traffic get higher priority), making you look like you stole the piece. This would theoretically let you set the record straight.

    Anyway, you get ten stamps a month for free, after which you pay a few bucks per month. This uses the blockchain in a sensible way, but you won’t feel like your site has joined the web3 era just because you use it, because it hides the whole blockchain business from you.

    WPSmartContracts

    Despite the “smart contracts” moniker, this plugin lets you carry out a number of different, basic cryptocurrency tasks. It focuses on the Ethereum  blockchain, and enables you to create ERC-20 tokens, Initial Coin Offerings, and has basic support for NFT marketplaces. The various things you can do with it are broken up into “flavors” of contract, with the simplest stuff being free and other flavors costing a small fraction of an Ether (though, note: a small fraction of an Ether is still some money, given that Ether is trading at over $4600 as this is written).

    Blockchain in WordPress? Still Early Days

    There’s still a lot of inventing on the fly in the world of smart contracts, NFTs, and alt-coin. But there’s also a lot of momentum behind it and there are likely some opportunities to be rewarded just for getting to the party early. Using plugins, particularly as they become more capable and robust, may very well be a way to get out in front of the pack while they struggle getting their blockchain programming skills up to snuff.

  • Theft Revisited: What Gatsby JS Should Steal from WordPress in 2022

    A long, long year ago, it seemed prudent to bring up a few things that worked well in WordPress that were missing in Gatsbyjs. For instance, one-click exchangeable Gatsby js themes.

    Some, but not many, of those holes have been filled in various ways, but others remain (and probably will remain). But time has pushed each of these web frameworks down the road a piece, meaning more developers have had more, different experiences with them. A knock-on effect of this is that it’s now clearer what it would be most useful to beg, steal or borrow from WordPress.

    WordPress vs Jamstack

    To be clear, Gatsby and WordPress are trying to solve somewhat different problems.

    Nor is anyone saying there’s something terribly wrong with Gatsby (or Next.js or Remix Run, the new kid on the block). WordPress is monolithic, the Jamstack crowd is looking for the Great Decoupling, plus static pages, plus edge functions, plus GraphQL queries to anything you might once have tackled with a REST API.

    Jamstack is aimed squarely at developers, not people who just want to drum up a website with their contact information and a few brochure pages. At the same time, a lot of the world’s websites are running on WordPress, frequently on fairly straight-out-of-the-box WordPress. That is, these are not people (and marketing departments) who are going to fall into the arms of Gatsby, even with a Gatsby template for a blogsite. They’re not going to be pushed into those arms, either, not by the need for blazing-fast speeds and not by their desire to move to a “friendlier” cloud CMS.

    As far as speed goes, last year’s “theft” essay got at something of a fundamental truth:

    A framework like Gatsby claims to have the upper hand by using static pages, but of course that’s not quite comparing apples to apples. If a JAMstack site needs to personalize pages on a per user basis, it may do so by way of API calls to a third-party services, but make no mistake, this is still just referencing a database on the back end. In the customized-page scenario, there’s no inherent JAMstack speed advantage. And, frankly, this is a fairly common scenario.

    Another thing happened in the course of the past year: Google rolled out the Core Web Vitals algorithm update that had us all worried about whether our web pages were as blindingly fast as they needed to be to rank. And it turned out not to make all that much difference. The WordPress sites of the world did not drop off the face of Google Search Engine Results Pages (SERPs).

    So if you’re running a website on WordPress and wondering whether you need to high-tail it to Jamstack, the pressure is off, by and large. It’s still nice to have a screamingly fast site, of course, and it’s nice, most folks seem to agree, to work strictly in JavaScript, rather than PHP, as is used for the core of WordPress.

    The Headless WordPress CMS Approach

    The Jamstack response is to argue that the point of decoupling the front end from the back end is that the back end can still run a WordPress stack. In Gatsbyjs, you’ve got the rather sweet option of using WPGraphQL (with a hat tip to Jason Bahl (@jasonbahl) for putting that great WordPress plugin in motion).

    That’s good stuff if you’re a developer, but on the flip side, all sorts of very useful things drop out of play if you abandon the WordPress monolith you’ve been running. And they’re mostly gone even if you keep running WordPress, but use it as a headless CMS.

    For one thing, the WordPress theme you’ve been using on the monolithic site is gone, with the design coming from the front-end side of the house.

    You can deal with this by getting a theme that behaves and looks more like WordPress—have a look at GatsbyWPThemes for a run at that (and I plan to dig in, try it out, and write about it before long, following on a great conversation the other day with Alexandra Spalato, one of the company’s founders.

    In short, you can’t just point your Gatsby front-end at your WordPress theme.

    It might seem like this should be doable because, after all, a theme is basically a bunch of CSS in a style.css file.

    But it’s not nearly so simple. For one thing, there are also template files that determine what the various repeating sorts of pages (blog entry lists, the blog entries themselves, and so on) should look like. These are written in PHP and HTML, using conventions that are very closely tied to WordPress.

    I’ve wondered in the back of my head whether it would be very hard to just write a simple (but would it be?) cross compiler to translate from the PHP files to more Gatsby-native templates. It wouldn’t shock me to see something like this get cooked up before too long.

    Jamstack Admin

    But even if we get to that point, where WordPress themes are convertible to Jamstack scenarios, you still won’t be able to jump into an admin console, look at a list of themes currently downloaded for use on your site, pick a different one, and hey presto, have a new and different look instantly online at your site.

    You can’t do that because, duh, there is no admin console for that Gatsby site of yours.

    If you build your site with a CMS and some other, separate services for identity management, database interactions, and localized customization, you have many things to manage and no centralized console.

    If you’re a relatively low-code user of WordPress, what you’re going to be missing most of all is that you can’t jump into the WordPress plugin section of the console.

    Gatsbyjs Plugins

    Now, Gatsby does have plugins. These plugins have some of the same uses as WordPress plugins, but they are designed to be consumed more or less as libraries that the developer has access to. Next.js has plugins, pretty much along the lines of Gatsby, along with some interesting third-party twists. For example, Grouparoo has a system for adding plugins that grab non-static content to add to pages.

    All that said, I’m not aware of any way on the Jamstack side of things for a third-party to program some simple little bit of functionality—to take a trivial example, giving you the ability to create pop-up footnotes within your text content[footnote]Why look, here’s just such a plugin in action.[/footnote]—that you can download and just start using at runtime and without having to work it into the fabric of your own custom application.

    During the static site generation process, extensions that acted on the source code or the generator would be called.

    Anybody who’s worked in WordPress knows that plugins can be an incredibly powerful way to get a lot done without having to do any real work. Books are always mentioning how many tens of thousands of plugins are out there. The huge number thing is nonsense, because there are all sorts of duds and orphans in the pool. But the decent plugins (and there are certainly a few thousand of these) out there make it possible for you to add nice bits of extra functionality because it’s already coded and it’s available with no fuss.

    WordPress plugins are a different animal, and Jamstack needs to steal this version of the plugin thing wholesale.

    Gatsby JS Extensions

    To keep things straight, I’m going to dub the Jamstack version of plugins “extensions.”

    Extensions should snap into a Jamstack framework along the same lines as their WordPress forebears. In other words, they should register callbacks to their functions with named events in the Jamstack process.

    As the user browses the site, other, runtime extensions would be called.

    So, if we imagine that there’s an event in a Jamstack site where a user logs in, that event might be called “user_login”. In the plugin, we’d include a function called greet_user() that did whatever we’d want to do now that the user was authenticated and we knew who it was. In addition to declaring and defining the function, a separate line of code would “hook” the “user_login” event, along these lines:

    register_action( 'user_login', 'greet_user' );

    Thus the user lands on the site, which because this is Jamstack is a bunch of basically static pages, there’s a login routine that does whatever it does, calling back to some remote service for authentication. When the user successfully logs in, the Jamstack page currently loaded “fires” the “user-login” event and calls back any functions that were registered for this event.

    Since we registered for this event, our greet_user() function will be called, we’ll do whatever we need to do, then the function will return to the overall process of showing pages and interacting with the user.

    Jamstack Architecture: Complicating Issues

    A bunch of things add some measure of complication to this, compared to the WordPress version of it.

    1. No admin interface. We don’t have the admin interface for adding and activating (and deactivating, and configuring) these extensions. For now, let’s pretend that this is no big deal. (It’s probably actually a big deal, because you probably want to build it so that non-developer admins can use and tweak extensions. That’s kind of the whole point of them, at the end of the day. But where does this thing live? Static pages on the client? But most clients aren’t admins…)
    2. Adding events to static pages. WordPress goes through its whole process for each and every page it serves, meaning there’s a centralized point (the code on the server) from which to execute events. It doesn’t matter where the user first lands—every page does this. With Jamstack, on the other hand, the user could request any page, so every page will need to know whether and how to fire events (or report back to some process that fires them).
    3. Generation time and runtime. WordPress is a simple process, dynamically building the page from header to footer, calling things along the way. Jamstack, on the other hand, has generation time in addition to client runtime, which of course is running on the edge in a browser. So there needs to be mechanisms for extensions that allow functions that do their work as pages are being generated (changing the text content of certain kinds of pages, for instance, with these changed pages thereafter being static) and functions that are shipped out to the client side, to be invoked at the appropriate moment, for instance, changing the content of a page as a React component switches in new content.
    4. Common variables and functions. This is probably the least of the issues, but it will enable extensions to do more work if there is a common environment in which extensions run (particularly on the client side). A WordPress developer has a huge list of functions and globally retrievable variables that describe the current state of the platform, who the current user is, what the URL of the current page is, what the URL of the folder that holds the templates is, what day it is, and so on. If all this sort of stuff is predefined, everybody knows what’s going on. Otherwise, everyone gets to reinvent the wheel for each outing.

    Getting back to my example of adding support for pop-up footnotes, the extension version of this would perhaps use a simple character sequence to denote footnotes in normal running content text, maybe something like [fn]comment that makes up the footnote[/fn].

    When the content is being rendered at the client, assuming we’re in a Gatsby-like environment where React is going to load in the content for the component on the fly, the content would be retrieved but, just before it was displayed, an event would fire and a callback would be made to the footnote extension.

    The Callback Process

    In WordPress, the content that goes in the middle of the page is accessible through a function call to, catchily enough, get_the_content(). Let’s assume there’s something similar available to the extension, that the content is scanned for the [fn] marker, and that some spiffy extra stuff is injected.

    Now, when the text is rendered onscreen, it includes a numbered footnote that pops up a note when hovered or clicked.

    Whoever developed this hypothetical site was not involved in making this happen. One of the site’s content developers (with appropriate administrative clearance) decided it would be great to have footnotes, found a footnote extension that had the right look and feel, installed the extension, and then added the markup to the content.

    The Upside of Aggressive Borrowing

    I don’t pretend to have worked out all the answers here, but none of the issues I’ve mentioned seems insurmountable.

    And there could be some real upsides to having a bunch of capabilities ready to plug in and go, just by checking the activate box.

    Menus, for example. WordPress menu configuration is something that could be handled by an interface on the generation side. In WordPress, I can write my own menu code if I want to, but if not, I can configure all sorts of things, beginning with the location on the page where the menu appears (and whether it’s sticky, and so on). All that stuff just happens. Building this as an extension in a Jamstack environment would mean faster deployments and more options for who changes the menus and when.

    Other examples: language localization, widgets that display links to related content, vast functionality additions like WooCommerce (a widely used plugin that provides a full range of ecommerce site capabilities), and so on.

    On the one hand, Jamstack seems to be slowly reabsorbing dynamic capabilities because, whaddya know, those dynamic things were nice to have. On the other hand, the flip toward static first, backend decoupled seems like the best approach now that there’s enough tools to make this more sophisticated architecture readily available. It’s an opportunity to borrow from time-tested approaches such as those that were gradually built into WordPress over the years. We should be able to benefit from the experience and rebuild these things cleaner and faster than ever.