English

🇬🇧 English articles and tutorials.

  • I tried to create a danish vignet for a multimedia designer project at Business Academy Aarhus. It was something of a challenge, because the AI introduced a lot of gibberish and strange spelling errors. The AI clearly wanted to use english words to the image, even though I wanted the illustration to be in danish.

    Here are a few samples:

    Here’re my prompt attemps – of course my text is in danish, but the AI insist on writing certain words in english. Some of the words don’t even exist at all in Danish and English!

  • On Github

    On the webpage you’ll see that your fork is behind what’s happening on the original branch:

    Now click “Sync fork”.

    Then click on “Update branch”. After a while your repo is updated.

    Open Github Desktop

    However, you still need to sync your local files. Here you have to “Fetch origin” in Github Desktop (or a similar app).

    Now you’ll see this:

    Then click “Pull origin”.

    Then your local files will be updated, after a while.

    Related video: Solve Merge Conflict

    How to solve a merge conflict by Github Deskop.
  • Try.new is an alternative to WP Playground. It will create a WP instance that will last for half an hour or so. Enough to try out new features.

    When you test, try the WP Beta Test plugin.

    Review: Try something else

    To be honest try.new is just an attempt to monetize WP Playground. Why use it – when you can get the same options for free with no time limit?

    Other Posts About WP

  • wp-now streamlines the process of setting up a local WordPress environment.”

    https://www.npmjs.com/package/@wp-now/wp-now

    If you want to host and run a WordPress Playgroundyou can install it via Node.js. First install node.js – if you don’t have it yet, follow the guide on the node.js webpage.

    Node.js works on Linux, Mac and Windows.

    Then install the package wp-now by npm, like this_

    
    sudo npm install -g @wp-now/wp-now
    cd my-plugin-or-theme-directory
    npx @wp-now/wp-now start
    • First line: on Linux and Mac use sudo, but probably not on windows.
    • Second line: you change to the directory with the theme or plugin to be tested.
    • Third line: now this will install WordPress in a hidden directort, and open a browser after a few seconds.

    Then you’re ready to develop or test.

    Reset

    When you restart the site will appear as when you left it. However, sometimes you may need a new version. You can reset your site like this, and then you’ll get a new WP for your experiments:

    npx @wp-now/wp-now start --reset

    Start in a Theme Directory

    A fast way to test a theme is to start wp-now up in the theme directory or in a plugin directory. Wp-now will then open WordPress in that theme. This is supereasy:

    cd /localhost/wordpress/wp-content/themes/your-theme/
    npx @wp-now/wp-now start
    wp-now started my homemade theme from the theme directory. In this way wp-now is a great tool when you need to test either a theme or a plugin.

    Blueprint

    A blueprint is a JSON file, that will define settings like the version of PHP or WordPress. You can install plugins and themes via blueprints too. You can load the blueprint like this:

    npx @wp-now/wp-now start --blueprint=path/to/blueprint.json

    The content of blueprint.json could be something along these lines:

    {
        "landingPage": "/wp-admin/",
        "preferredVersions": {
            "php": "7.4",
            "wp": "5.9"
        },
        "phpExtensionBundles": [
            "kitchen-sink"
        ],
        "steps": [
            {
                "step": "login",
                "username": "admin",
                "password": "password"
            },
            {
                "step": "installPlugin",
                "pluginZipFile": {
                    "resource": "wordpress.org\/plugins",
                    "slug": "instant-images"
                },
                "options": {
                    "activate": true
                }
            },
            {
                "step": "installPlugin",
                "pluginZipFile": {
                    "resource": "wordpress.org\/plugins",
                    "slug": "w3-total-cache"
                },
                "options": {
                    "activate": true
                }
            },
            {
                "step": "installPlugin",
                "pluginZipFile": {
                    "resource": "wordpress.org\/plugins",
                    "slug": "wordpress-seo"
                },
                "options": {
                    "activate": false
                }
            },
            {
                "step": "installPlugin",
                "pluginZipFile": {
                    "resource": "wordpress.org\/plugins",
                    "slug": "ewww-image-optimizer"
                },
                "options": {
                    "activate": true
                }
            },
            {
                "step": "installPlugin",
                "pluginZipFile": {
                    "resource": "wordpress.org\/plugins",
                    "slug": "blocks-animation"
                },
                "options": {
                    "activate": true
                }
            },
            {
                "step": "installPlugin",
                "pluginZipFile": {
                    "resource": "wordpress.org\/plugins",
                    "slug": "font-awesome"
                },
                "options": {
                    "activate": true
                }
            }       
        ]
    }

    “Man” wp-now start — help

    Here are the options from the man page:

    Options:
    –version Show version number [boolean]
    –path Path to the PHP or WordPress project. Defaults to the current working directory. [string]
    –php PHP version to use. [string]
    –wp WordPress version to use: e.g. ‘–wp=6.2’ [string]
    –port Server port [number]
    –blueprint Path to a blueprint file to be executed [string]
    –reset Create a new project environment, destroying the old project environment. [boolean]
    –skip-browser Do not launch the default browser
    [boolean] [default: false]
    –inspect Use Node debugging client. [number]
    –inspect-brk Use Node debugging client. Break immediately on script execution start. [number]
    –trace-exit Prints a stack trace whenever an environment is exited proactively, i.e. invoking process.exit(). [number]
    –trace-uncaught Print stack traces for uncaught exceptions; usually, the stack trace associated with the creation of an Error is
    printed, whereas this makes Node.js also print the stack trace associated with throwing the value (which does not need to be an Error instance). [number]
    –trace-warnings Print stack traces for process warnings (including deprecations). [number]
    -h, –help Show help [boolean]

    For more information, see:

  • Gallery of Blueprints

    Blueprints for a range of projects, watch the gallery on Github:

    Developer Resources

    Networking and Storage

  • WordPress Playground is made for experiments. However, plugins are not easy to install. If you want to install and use plugins you have to change the URL and add:

    &networking=yes.

    If you have local storage you will be asked if you want to continue working with the local files. Just answer yes.

    Playground is experimental. Some plugins will not run here. So you have to experiment. For example Kadence Blocks work like a charm. Jetpack did not.

  • Here a custom font was implemented in a template. Now you can use it … Q.E.D.

    This solution is rather a workaround, but the main problem is solved.

    When you add a WordPress Style Variation it is possible to add a new font. However in the style editor it seems that the new font cannot be enabled. When you save, the font is automaticly changed back to the original font.

    There is a solution, however cumbersome:

    Change the font in the template. There it’s possible to use the new font. Above you see a menu with a custom font.

    Of course this behavior strange, and does not make sense.

    PS: the font features are improved from version 6.5.4 and up. Now you can add additional fonts from the FSE in the main design panel.

  • Under appearance you find the style variations. Just click the style variant you fancy. Then save. Now your website is transformed into something completely different.

    Did you know that you can create your own style variations? In the theme folder ./styles you’ll find the style files. They are named after their intended effect, e.g. .styles/blues.json.

    Mostly these files will create changes to colors or gradients. If you want to add fonts you’ll have to add lines to the JSON. Here it’s easy to make errors.

    So how do you get all fonts and styles from the theme – and then modify? These settings are defined in the theme’s theme.json file in the root folder.

    What if you could just create a copy of theme.json – and then modify everything? That would be a real game changer.

    In fact you can do this. Follow these steps:

    1. Copy the theme json.
    2. Paste the file as: ./styles/theme.json
    3. Now rename the file to something convenient: ./styles/myStyle.json

    Now open the myStyle.json in your favorite editor, and add the key value pair:

    “title”: “Your Title Here”

    somewhere around line four, as in the image below:

    The style title is “Per fra theme.json”. You can of course give your style a more convenient title.

    Now is the time for a test. Go to Appearance / Styles. Hover the mouse over the styles. Now one of the should be your style. In the top image, you can see my style, like this:

    Hover the mouse over the style tile.

    Now activate the style and save it.

    Since we have all the theme settings it is relatively easy to edit the styles or even to add alternative fonts to the theme. You can also edit styles in the editor.

    Why Create a Style Variation?

    You could ask: why should I create my own style variation?

    Answer: if you edit either the theme.json or one of the standard styles you risk loosing your additions if the theme is updated. This will not happen when you create your personal style variations.

  • This daily chess puzzle is embedded from Lichess.org:

    The puzzle is embedded in an iframe inside a custom HTML block.

  • These are my research notes about the new Woo blocks.

    By now WooCommerce has changed totally. Now everything is block based, and this will make all editing much more easy – since all is done by drag and drop. Exactly as we know it from the Gutenberg editor.

    Jamie Marshland: 10 minutes Woo Introduction

    Woo Blocks – in ten minutes

    In Jamie’s video you’ll hear that it’s possible to work with categories, keywords and tags in the page templates. Here are a few tips on how to do this.

    Woo Blocks

    Click the button and read more about the new blocks aka “Set up products”:

    Categories, Keywords, Tags

    You can filter by taxonomies. Obbiously we’ll need blocks from a premade template as our model. Here you can eiter use or copy the blocks from one of the filtering templates:

    Click the button and follow the instructions by Woo.

    Woo: Top Ten Blocks

    Top ten Woo Blocks by Jamie Marsland

    Tutorial

    The following tutorial is made in a Kadence Theme. That’s why the Dashboard looks a bit different.

    Jack – Woo shop no plugins
  • I created a WP theme from scratch. Here I followed the fine tutorial by Carolina Nymark.

    Here is a cheat sheet with some of the common blocks in Gutenberg.

    Gutenberg Blocks Cheat Sheet

  • This tutorial is based on the most recent standard theme for WordPress (WP): Twenty Twenty Four. However, the principles should work for any block-based WP theme.

    Select a relevant style

    Select a style
    Select one of the styles in Appearance / Styles. I used Rust for this tutorial.

    Modify the style

    Now you can modify your style. In my case there was a lot of irrelevant information in the header and footer templates. I removed the unwanted informations on the frontpages template too.

    You can edit the header and footer in Appearance / Edit / Patterns / Header

    How to edit all headers in one go
    There is only one header here. This template pattern is used in many places. So if we edit this header, we will edit all headers in the active style.

    In my case the colors were reversed in the header and footer, so that the background was dark and the text was made in a contrasting color. The links were changed too, since they would disaapear with this new background.

    Header in new colors in the Rust style.

    Here you see the header with reversed colors from the theme.

    In this case a worked on a local computer, but you could work in a staging environment too. Now when the work with the styling is finished it is possible to export the entire theme and upload it to your webserver.

    Export the theme

    Under Appearance / Edit / Styles you can click the pen.

    Then click the three dots icon found in the top right corner.

    The menu to the right should appear.

    Now you can export the theme. Click on Export. The file will be downloaded to your Downloads directory on the computer.

    Fonts

    I have tried to add fonts, but this experiment is only a partial success! You can see the fonts in the editor, and sometimes use the additional fonts with the blocks.

    Permanent Marker works fine when my petj_rust style is enabled [this sample will only work as long as I use the petj_RUST style] 😉

    However, if I try to add the costum font to a heading, the style is overruled!

    Even a custom CSS !important clause is ignored by the theme. Perhaps this is a bug in Twenty Twenty Four?

    Code sample.

    The Theme Zip

    If you open the zip file you’ll see the standard Twenty Twendty Four files. In the styles folder you can see a series of JSON files, one for each of the styles. If you want to have your own styles you can copy the rust.json file and give it a new name, e.g.

    aGoodName.json

    You can modify the JSON inside the file. A good start is to rename the theme name and add a description in the key value pairs, e.g. like this in your favorite editor:

    "$schema": "https://schemas.wp.org/trunk/theme.json",
    "version": 2,
    "title": "PETJ Rust",
    "description": "Multimusen's take on the RUST style.",

    Save the JSON file, and yo are ready to go.

    Tweaking All Styles

    You can tweak all the styles in the JSON:

    • Colors
    • Fonts
    • Duotones
    • Blocks

    But this has been covered in some of my other tutorials. You can even select to block other users from changing the palettes and similar settings.

    Then you are ready for the final step in WP.

    Read Carolina Nymark’s article about theme.json.

    Upload the Theme Files.

    Now you can upload the revided theme to WP. Here I’d prefer to upload to the web host via Filezilla. If Twenty Twenty Four is installed, just upload and overwrite the files.

    Filezilla in the local directory with Twenty Twnety Four. And pointing to a similar folder in the directory:

    wp_content/themes/twentytwentyfour/

    The result

    Now that’s all it takes to tweak a style. After the upload the theme will look exactly like what you did with the tweaks. Even headers and footers will look like your local version of the WP JSON Style.

    Here is the final result, a new styled theme for Multimusen.dk:

    This is what MUltimusen.dk looks like after the tweaks.

    Upload the Files to Github

    Since the work is done you can upload your new tweaked theme to a github repository. Here is my repo: https://github.com/asathoor/petj-twentytwentyfour

    That’s all folks!

    The game’s afoot, Watson!

    Sherlock Holmes

Enable Notifications OK No thanks

We use cookies - more information

Multimusen.dk will set a few cookies from Doubleclick, Google and the Social Media plugins they ay set some cookies. Some of my pages use APIs - such as YouTube, LinkedIn, Google Fonts, Google Maps, Mapbox, Spotify, Jetpack, Twitter, Facebook &c.. Such plugins may set the odd cookie.

Close