Screenshot of website clearly indicating presence and location of additional Categories menu button

Adding the CATEGORIES navigation menu to Simone theme

I’m already forgetting how I did this, and there’s still more to do, so trying to record some of it here. It’s all very unpolished and trial by error so far. (Like this site!) The purpose is that a primary reason behind my thinking for this site, is to be able to record and index […]

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

    <?php
    if (has_post_thumbnail()) {
        echo '<div class="single-post-thumbnail clear">';
        echo '<div class="image-shifter">';
        the_post_thumbnail();
        echo '</div>';
        echo '</div>';
    }
    else  if ( get_post_meta( $post->ID, 'featured-div', true ) )
    {
        echo '<div style="max-width: 100%; overflow: hidden;" class="single-post-thumbnail clear">'; 
        echo '<div class="image-shifter">';
        echo get_post_meta($post->ID, 'featured-div', true);
        echo '</div>';
        echo '</div>';
    }
    else  if ( get_post_meta( $post->ID, 'featured-xpost', true ) )
    {
        // get custom post type xpost by slug, and insert
        // so that shortcodes are processed getting the content
        echo '<div style="max-width: 100%; overflow: hidden;" class="single-post-thumbnail clear">'; 
        echo '<div class="image-shifter">';
        $xpostslug = get_post_meta($post->ID, 'featured-xpost', true);
        $args = array(
          'name'        => $xpostslug,
          'post_type'   => 'xpost',
          'post_status' => 'publish',
          'numberposts' => 1
        );
        $my_posts = get_posts($args);
        if( $my_posts )
        {
          // echo 'ID on the first post found ' . $my_posts[0]->ID;
          // echo $my_posts[0]->post_content; // this wouldn't process the shortcodes
          $xpostID = $my_posts[0]->ID;
          echo do_shortcode(get_post_field('post_content', $xpostID));
        }
        else
        {
          echo 'ERROR: FEATURED XPOST NOT FOUND';
        }
        echo '</div>';
        echo '</div>';
    }
    ?>

WordPress Theme tinkering – featured div vs featured image

As I’m revising this blog (so far), retrospectively updating elements and enhancing my own plug-in, I decided it’d be cool to be able to have a “featured div” sometimes, in place of a “featured image”.

Screenshot of https://xarta.co.uk on a portrait monitor on 21st June 2017

xarta.co.uk online – woohoo

Article Contents 1: Introduction 2: The Good incl. 99% on DareBoost! 3: The Bad 4: The Ugly 5: ToDo’s 6: Next Steps Ok … so I still have to deploy it to my “new” “live – live” webserver rather than my (routed-to-live) staging one slowed down with all my Dev stuff … but https://xarta.co.uk is […]

Illustrative purposes - screenshot of Bash terminal

Apache2, git clone from GitHub as www-data, and remote add origin existing git to GitHub

Command line git notes Example: for my blog’s contact page where I composited absolutely positioned divs including an iframe with a WebGL / three.js tunnel effect I’d forked on GitHub, I wanted to keep that “component” as a separate project, cloned from my fork.

404 error

Nothing to see here

Honest.
If you think something is broken, report a problem, in triplicate.

Apache2 – Directory Browsing on by default! RedirectMatch 404, and git exclude

I had no idea this was the case – Apache2 Directory Browsing on by default. Only found out when I added a .git initialisation to my “xarta” folder as my JavaScript was outgrowing WordPress’s Header/Footer plugin and I wanted to use Visual Studio Code’s intellisense – in particular with the three.js library.

OpenSSH, Google Authenticator, PuTTY, Xming X, Ubuntu Lightdm (disable), and Grub text mode

Just notes to self for setting-up OpenSSH on Ubuntu and Raspberry Pi. Will add to over time. https://help.ubuntu.com/lts/serverguide/openssh-server.html First of all I installed OpenSSH server: sudo apt-get install openssh-server Normally in Windows I use Putty (portable putty alternative … for Xming X Server). Depending on name resolution available to me which is limited at the […]

Visual Studio Code Typings for three.js

At the moment, right now, just while I use three.js together with WebGL to make a simple animation for my contact page, I’m skipping proper tooling and just want to edit JavaScript that uses the three.js library. Most of the tutorials out there use deprecated functionality and I really really want Intellisense for the current […]