Add Random Post with Shortcodes Ultimate

Wordpress Plugins

Generating a Random Post in WordPress

There are many plugins out there that an generate a random post to be inserted into your website. An example of such a random post is shown to the right of this entry in the box-set off. Some of the plugins come with their own shortcodes. But there’s no need to install another plugin if you have Shortcodes Ultimate installed.

Shortcodes Ultimate by Vladimir Anokhin is a popular plugin for WordPress supplying numerous helpful shortcodes to add various features to your posts.

Using Shortcodes Ultimate to Generate a Random Post

This method permits you to customize the random listing so that it can include only the title, the title and the featured image, or even the entire content.

  1. Install the Shortcodes Ultimate plugin if you haven’t already.
  2. Customize Your Shortcodes Ultimate Template

  3. On your server, in the “wp-content/plugins/shortcodes-ultimate/” folder, create a new file called “random-post.php”. You can do this through the file manager on CPanel or other frontend on your host (or through SSH if you have command line access).
  4. Grab This Code for Your Shortcodes Ultimate Template

  5. Edit the “random-post.php” to add code for your random post – use (and modify if you wish) from one of the following:
     

    Template Code to Show Random WordPress Post Showing Just the Title and Featured Image:

    Template Code for Random Post To Show Full Content

    Random Template Code To Show The First Few Paragraphs of WordPress Post

    NOTE: This option is not recommended as it will arbitrarily truncate your post content including HTML tags which may mess up the formatting on the rest of the page where this code is inserted) .

  6. After pasting in one of the three above, save the file.

Try Out The Random Post Short Code

  1. Click on the Shortcodes Ultimate button in your editor:

    Shortcodes Ultimate Insert Shortcode Button

  2. A dialog will open. Click on the “Posts” code:

    Shortcodes Ultimate Posts Button

  3. Edit the Template name to read “templates/random-post.php” to match the name of the template you just created.
  4. Screenshot Template Name

  5. Complete the rest of the dialog options. When finished, click “Insert” to insert the Posts short code.
  6. Preview the post to verify that a random post was inserted.

Get Smart with a Smile – O’Reilly Learning Platform for $75 a Year

Oreilly Logo

Iconic Media Publisher

O’Reilly Media is that iconic media publisher most well known for its books having covers featuring hand drawn animals:

Learning React Book Cover

Unlimited Access Through O’Reailly Online Learning Platform

In case you didn’t know, O’Reilly has an awesome online learning platform. Check out O’Reailly’s promotional page and video describing its offerings. Many companies use the excellent platform to train employees.

Access to the premium content normally costs $500 a year for an individual.

Here’s a screen capture of the feature list from the O’Reilly site as of the date of this post:

OReilly Learning Platform Feature List

I’ve personally used the site for several books and courses and can’t believe the value. I have purchased several courses at Udemy for example and this platform solidly outperforms Udemy’s offerings. The O’Reilly site offers all the computer books and training you could ask for on the latest IT technologies and software development. Besides books (including classics, new and pre-release titles, and countless non-O’Reilly publishers), the Learning platform offers daily live seminars, recorded video talks and conferences, and interactive labs – access unlimited for a yearly fee. In addition, O’Reilly has mobile apps that allow you to access all the material on your phone.

So how do you get all of this and more for $75 a year instead of O’Reilly’s price?

ACM Membership Provides Full O’Reilly Platform

The little known secret is that you can access all of the O’Reilly Learning platform by being a member of the Association of Computer Machinery (ACM). Professional Membership to the ACM for individuals is typically $100, but is currently on promotion for $75 for new members.

What is ACM ?

Here’s the description on the ACM Website:

CM is the world’s largest computing society, offering benefits that can advance your career and enrich your knowledge with life-long learning resources. Enhance your professional career or academic life with ACM member benefits that include a free subscription to ACM’s flagship publication Communications of the ACM; online books, courses, videos, and webinars through the ACM Learning Center; opportunities to participate in Local Chapters, Special Interest Groups, and conferences all over the world; optional discounted subscription to the ACM Digital Library; savings on peer-driven specialty magazines and research journals, plus other exclusive member discounts.

I recently became an ACM member and have been blown away with the O’Reilly offering.

Skillsoft Tutorials Also Available

And just today I discovered that in addition the O’Reilly Platform, ACM provides access to Skillsoft/Skillport, another excellent learning platform offering countless up to date computer video courses and books. Once you get your ACM membership, just login to https://acm.skillport.com for acess.

Why aren’t the benefits of ACM Membership more generally known ?

Probably because ACM is a non-profit and doesn’t go out of its way to advertise the O’Reilly offering. It is just one of many benefits that it offers its members. I found out about the O’Reilly benefit of the ACM membership in an obscure posting on the internet. The ACM website is also old-school and difficult to navigate, filled with lots of obscure references and outdated information. For example, one of the site’s pages mentions that ACM membership provides access to “Safari’s entire collection of 40,000 online books and videos”. Safari is the old name for O’Reilly’s learning platform and the current collection exceeds the 40,000 number. The list of member benefits does mention O’Reilly and Skillsoft but not as a separate line item, only as part of the “Learning Center” description.

Other Benefits of ACM Membership

In addition to O’Reilly, an ACM membership gets you many other benefits, including networking and job boards, the hard copy ACM magazine delivered to your door, various discounts, and access to the ScienceDirect platform and other e-learning sites.

NOTE: Your employer, university, school, or library also may grant you online access from home to the O’Reilly or Skillport platforms for free. My local library provides access to other digital learning platforms, but not O’Reilly.

If free is not an option then don’t hesitate to get your $75 ACM membership now (note that student memberships to the ACM are only $25). I’m getting no commission or payment for this link – I just think it’s an awesome offer.

One final note, you will see many references to the “ACM Digital Library” on the ACM website. The standard membership that includes access to the ACM Digitial Library costs $198. The ACM digital library is NOT the Oreilly platform – it is ACM’s own private library containing loads of technical papers and books – if you are into that sort of thing then spend the extra money but it is not necessary for O’Reilly or Skillport.

Repair Your BCD Boot Blue Screen of Death

Windows 10 Blue Screen of Death

Failure to Boot After The Dreaded Blue Screen of Death

Occasionally in Windows 10 when a Blue Screen of Death (or “BSOD”) occurs similar to the above, the computer will not boot. The failure to boot can be caused by a variety of reasons. Many times it’s caused by the BCD/EFI store becoming corrupted (or by being “fixed” incorrectly by Windows particularly if you have a non-standard boot setup).

The following usually gets me up and running. Note that this post only applies to computers having UEFI firmware or using a UEFI emulator like the Clover boot manager or reFIND). Most computers built in the last 10 years use UEFI firmware.

Caution: Backup your hard drives before continuing. Although these commands typically do not cause data loss, it’s possible you have a non-standard configuration and/or defects on your drive. Not responsible for data loss – the following is at your own risk.

    Boot Into Windows Recovery Console

  1. Boot the machine from a USB Flash Drive using the Microsoft Windows Install Media USB drive. You’ll need at least an 8 GB flash drive.
  2. At the install screen below press the “SHIFT-F10” keys together to get a command prompt.Windows Install Dialog
  3. Recovery Console Commands

  4. The Recovery Console will open. Type the following commands:
  5. Find the volume that is FAT32, and has no label (or labeled “EFI” and is about 100 MB. It typically is also shown as “SYSTEM” or “Hidden” Here is mine as an example:

    Windows Command Console List Volume

    NOTE: If you do not see an EFI partition your computer is probably older and does not use UEFI firmware, using instead the older Master Boot Record (MBR) method of booting. If this is the case, then this post does not apply to you and won’t help you.
  6. Select that volume (in my example, Volume 2)
  7. Assign it a letter that is not being used by your other drives (I usually use A: as that is almost always available):
  8. Make sure from the list produced by the “list volume” command, that there is a letter assigned to the drive that contains your “Windows” folder. This is usually drive “C”. If the Windows drive is not assigned to C, or if “list volume” does not show a letter assigned to the drive containing your Windows folder, select the Windows volume and assign a letter to it as was done for the EFI volume above. In my example, I do not have to assign a letter since C is already assigned to the Windows drive.
  9. When you are done assigning letters to the volumes, exit diskpart:
  10. Use robocopy to make a backup of the files on your EFI partition in case something goes wrong. In this example I am copying all the files to my G drive, so substitute your backup drive letter for the “g” below. Robocopy automatically will create the “efi-backup” folder:
  11. Before issuing the BCDBoot command, do a chkdsk on each of your EFI and Windows partitons to fix any errors (substituting the letters assigned to your EFI partition and windows partitions respectively for A and C below if yours are different):
  12. Enter BCD Boot Command

  13. When those commands finish, issue the following bcdboot command which copies your system boot files into your EFI partition (substituting the letters assigned to your EFI partition and Windows partitions respectively for A and C below if your letter assignments are different):

    Reboot Computer

  14. Assuming the BCDBoot command was successful, reboot your computer and if you are lucky and the underlying problem that caused the BSOD has been fixed, rebooting will be successful. Note that on rebooting, Windows 10 often takes a while to reconfigure things or autorepairs after a BSOD and BCDboot command. You may get a few more BSODS and have to reboot 2 or three times before you get to the windows login screen.