Blog

  • How to find WordPress theme’s stylesheet handle

    A few moments ago, I wanted to append an inline style to the theme’s stylesheet from within a plugin. This requires knowing the current theme’s stylesheet handle, so here is a function that finds that string.

    private function find_theme_stylesheet_handle() {
    	global $wp_styles;
    
    	foreach( $wp_styles->registered as $handle => $style_obj ) {
    		if( $style_obj->src === get_template_directory_uri() . '/style.css' ) {
    			return $handle;
    		}
    	}
    	return null;
    }
    
  • How to fix WordPress filter robots_txt not working

    WordPress provides a filter hook, robots_txt, that dynamically generates robots.txt if the file does not exist. This filter allows developers to create unique robots.txt files for each site in a multisite network, since all the sites in the network share the same root directory (and therefore the same robots.txt file).

    If this filter is not working for you, you may need to delete the robots.txt file from the root directory. The robots file will not be generated if the file actually exists.

    Robots.txt is a file that communicates The Robots Exclusion Protocol to non-human website visitors, which are commonly called bots. Bots read robots.txt for guidance about how to best crawl the site.

  • Lititz Craft Beer Fest Homebrew Competition 2017

    Lititz Craft Beer Fest Homebrew Competition 2017

    11×17 poster hung in and around Lititz to promote the 2017 Homebrew Competition

  • WPEngine caches WordPress REST API GET responses

    Logged out users of a website hosted at WPEngine may receive cached responses to REST API calls via the GET method. API calls work correctly while logged in, but paths in the /wp-json/ directory are cached like much like the rest of the front-end.

    How to prevent cached REST API responses

    As of June 2017, the only way to disable this behavior is to open a ticket. WPEngine support technicians can create tickets based on live chat sessions.

    Excluding a directory from caching happens at the install level, so a new request via ticket must be initiated after each new install is created.

    UPDATE: WPEngine made this change to all 49 installs in my account in less than 24 hours.

  • A monogram for my brother

    A monogram for my brother

    I created this monogram for my older brother, an artist who uses the elements of nature. Aaron Salzano

  • How To Market An Event On Twitter

    While writing the companion piece, What It’s Like To Co-Organize Your First WordCamp, I realized that I had created a list of Twitter marketing tips that should really live in their own post. Here’s that.

    I run a number of Twitter accounts, and some people seem to enjoy following them. A few of them, @LititzBeerFest and @WordCampLanc promote annual events. Here are some examples of how I have been an event cheerleader on Twitter. Less than 100% of the tweets from these two accounts are written by me, but all of the tweets included in this post were written by me.

    You are in a countdown to the event, so you can link X days until the event to a relevant number.

    Everything is an exclusive. Twitter is where all news breaks, so help the reader of your tweet believe they are the first person to receive your message.

    Twitterers appreciate the careful use of emoji.[citation needed]

    Have a sense of humor. Carefully. Riffing on current events is often hilarious, but risky business for brands. I got away with this one on the night of one of the 2016 Presidential debates to show off our left-over kegs. This is an Instagram photo and caption that I shared to twitter.

    https://www.instagram.com/p/BK12LUljOGS/

    I didn’t take any risks with the WordPress audience, however, and instead, I opted for mostly harmless quips in quote-retweets.

    Use scheduling software. I like TweetDeck, but I am glad my WordCamp Lancaster team used HootSuite because now I know a bit about HootSuite. These apps allow teams to collaboratively use an account and not step on each other’s toes. (These apps also allow you to tweet early and sleep in.)

    Don’t auto-post from Facebook. Everyone knows that you didn’t write a tweet that ends with a fb.me link for Twitter, and Twitter lovers like me refuse to retweet that trash. Even if your primary publishing platform is Facebook, do not auto-post to Twitter. During the first few years of the Lititz Craft Beer Fest, I developed a habit of posting on Facebook and rushing to Twitter to delete and rewrite the auto-posted tweets because someone had already linked the two together. That’s not totally effective or a thing that normal, sane people do. I have since severed the link.

    Repeat yourself. Starting a tweet with ICYMI (in case you missed it) is totally appropriate. Quote-retweeting yourself is OK. Tweeting an identical tweet twice a day is not cool, though. If someone feels that a tweet was generated by software, they will be less likely to read and spread your message.

    Be generous with the likes and retweets. Most of what you do to grow any account’s reach is to search for relevant terms, click the Latest tab, and like many tweets. For WordCamp, I searched WordCamp and liked tweets about other WordCamps both near and far. For the Lititz beer festival, I searched Lititz beer to find everyone tweeting from local bars. If your sponsors aren’t active on Twitter, like a few of their old tweets to let them know you’re ready to help them grow by retweeting anything they give you. Retweet lots of people that mention that they are excited about or just acquired tickets to your event.

    Don’t disappear during the event. This is hard unless you don’t have many obligations the day of the event. If you are using an event hashtag, you should be watching that in addition to answering questions and still cheerleading. I am proud to have prompted this photo of our WordCamp organizer team, and our followers enjoyed it, too.

    Do disappear a few weeks after the event. It’s OK that your account goes inactive for months at a time for an annual event. The Lititz Craft Beer Fest sells out every year, so too much action just reminds some people that they are on the outside looking in. I also don’t want to lose followers in the off-season, and it’s hard to want to un-follow an account that isn’t showing up in your timeline. There are also critical milestones that can hold up event marketing, like confirming dates and venues. The marketing should start when you are ready to announce your date. You can even hold the venue to be it’s own separate press release.

    I hope these tweets and thoughts are helpful. I am @salzano on Twitter. Maybe I’ll see you at an event?

  • What It’s Like To Co-Organize Your First WordCamp

    I helped organize WordCamp Lancaster 2017. I was a rookie and had not worked on a WordCamp before. As soon as I had agreed to join the organizing team, I went searching for a post like this and didn’t find many. There are a few good ones about organizing a WordCamp in a city that has never hosted a WordCamp before, but that’s not my experience. WordCamp Lancaster 2017 was the conference’s fourth year, and it was a huge success. Here are my thoughts.

    Why Organize Events?

    My code-writing brain loves iteration, and there is a special place in my heart for an annual celebration. I am proud to be leveling-up each year as a member of the Lititz Craft Beer Fest organizing team. Also, I had known that I wasn’t going to be in town to volunteer at Lancaster Roots and Blues 2017, a local music festival, which I had helped each of its previous years.

    Why This Was Scary

    When I first joined the beer festival team, my value to the group was being the only person in the room who could build and launch a website. This is an entry-level skill among WordCamp organizers. I knew that I would have to be useful in other capacities to help the event succeed.

    I Respect The Hell Out Of WordPress People

    WordPress events bring out the best version of me, because I love everyone I meet and want to return the kindness I receive. I have never felt so welcomed and appreciated by any group outside of my family. The challenges are enriching, and the conduct is world-class. I started writing notes for this post before the event even happened because I knew I would loathe publishing something that didn’t have every morsel of value I could offer.

    I asked some folks who had already organized WordCamps if they had any advice for a newbie, and I received some great guidance from my pal Liam at the December Philly Burbs Meetup.

    “Volunteer, volunteer, and volunteer to volunteer. After you’ve volunteered and enjoyed it, think about organizing.”Liam Dempsey, probably

    I sought this advice one week after WordCamp US 2016 where I told Rami & Dustin that I would accept their invitation to co-organize and before I had ever volunteered at a WordCamp. Oops.

    My Amazing Team

    Andrew Adcock, Dustin Leer, Corey Salzano, Rami Abraham, Jonathan Ober, Charlie Reisinger, and Lauren Pittenger, WordCamp Lancaster 2017 organizers

    I am so grateful to have been a teammate with and to have learned from…

    Things That Will Absolutely Happen

    You will spend hours each week for a couple months preparing for the conference. When Rami asked me to join the team in November, he told me that it would require about 5 hours a week beginning the moment I said yes until the conference happened. He was right. Most of our team took at least a half day off of work on Friday to procure local goods (drinks & snacks) and services (badge printing) and prepare the venue before the speaker dinner began at 6pm.

    You will run out of time. This is an event with a fixed date, after all.

    Wisdom from our leader. As the days and hours counted down to the conference, the number of things that needed our attention only increased. There is this ramp up to any event where the time you have to make decisions decreases while the importance of those decisions increases. At some point, it’s too late to plan, deliberate, or place an order that requires shipping. The decreased amount of time helps you handle more things, but it’s only human to feel like you’re totally winging it because you didn’t spend as much time on decisions right before the event as you did scheduling tweets two months ago. Also, you are winging it.

    You will rely greatly on your veteran team members. I was able to help answer a lot of, “how did that happen last year” questions by simply being an attendee, but my experienced co-organizers steered this ship. Rami, Dustin, and Lauren returned after organizing previous years, and Andrew brought his experience in organizing WordCamp Baltimore. Major items were essentially complete on day one because of these veterans. We didn’t have to design a budget, and essentials like our venue and caterers were redialed. I will never forget a moment in January when I was tasked with trying to solicit as many speaker applications as possible. I asked how many would be enough, and Rami said, “We’re going to have a couple speakers drop out. It happens, people’s lives change, and we’ll need back-ups.” Exactly two speakers canceled on us after we had announced our schedule, and we fell back on those other applicants to fill the slots.

    You will be surprised by the lack of control you get over your wordcamp.org website. Only Twenty* themes and no child themes. (WordCamp sites started shipping with a starter theme called CampSite 2017 soon after our event.) No plugins menu. There are some cool tools, like a Remote CSS plugin (that allows you to include a stylesheet from a Github repo) and JetPack. I understand the need for heightened security on wordcamp.org, but it’s hard to get excited about designing a site without being able to edit templates via a child theme. (And that’s a strange feeling to have while running a web development conference.)

    <fan-fiction>This is by design. WordCamps used to have total freedom over their sites, but no WordCamps actually happened then because the organizing teams were never ready to launch their websites.</fan-fiction>

    You will need to quickly solve logistical challenges and communicate news to your speakers, volunteers, and attendees.

    • Our venue’s wifi was not password-protected and had the same name as the building. Even so, I was asked 3 or 4 times what the wifi situation was before I wrote a note at the bottom of our job board and Lauren wrote a tweet.
    • We had no plans to include a Happiness Bar at our event, which is a help desk anyone can sit at and offer free WordPress help. A few friends asked me after opening remarks if we had one, and I told them no. Less than 10 minutes later, I found two fellow organizers arranging tables and chairs in the hallway between our two session rooms and hanging a hand-lettered sign. This move enriched our event during moments like this:

    • Our schedule was supposed to include an afternoon break, but it was published without one. We decided to modify the online schedule by 15 minutes, scribble over times on the schedules posted outside our rooms, and announce the changes during the next break between sessions. Sounds terrible. It wasn’t.
    • We made a dinner reservation for organizers, speakers, and volunteers, but forgot to invite anyone. Here is a great photo of Charlie and I learning how to use our team’s MailChimp account to send those invites at 8:30am.

    Attendees will be oblivious (and that’s OK)

    • Attendees will not have read the blog posts you have published on your camp’s website. (And that’s OK. They’ll still show up at the right place and have a great time.)
    • Attendees will buy tickets the night before the event and the morning of the event. (And that’s OK. I was one of those attendees at WordCamp US 2016.)
    • Attendees won’t care if they buy tickets too late to get printed badges. (And that’s OK. You will prepare blank badges.)
    • Attendees won’t understand what a Happiness Bar is. (And that’s OK. They’ll go from zero to using it in seconds.)

    Your team will receive critical questions from attendees hours before the event. I anticipated this, but these two questions really struck me as something I would have tried to figure out much earlier.

    • 9:30pm: Is it too late to change the personal details attached to this ticket? How?
      • Answer: Absolutely not, just click the link in the confirmation email again and change the values in the text boxes. This person will not have a printed badge waiting for them, but we will have blanks and permanent markers at registration.
    • 11:00pm: Does the venue have a wheelchair available?
      • Answer: I will not know until shortly after 7am when we return to the venue. (The venue did have a wheelchair, and I replied after I placed said wheelchair in the vestibule. It was utilized.)

    Everyone will get upset if you run out of coffee. Attendees will wither. Speakers will loathe its absence during their talks. I do not drink coffee, but I so badly wanted there to be coffee during the few hours we had none.

    You will very likely not attend sessions unless you are the MC or videographer of the room. Did you know that every session is videotaped and archived on WordPress.tv? You have to make that happen, too. The hardware is owned by the foundation public-benefit corporation, shared, and shipped from WordCamp to WordCamp. So, you can watch the sessions later online after you upload them. Here are the sessions we have uploaded so far!

    You will be exhausted. Cherish the moments that you find yourself with a few calm moments to recharge. I slept on the floor of our speaker green room for almost 20 consecutive midday minutes.

    Corkscrews will remain elusive. If you serve alcohol at your after party (instead of hiring bartenders to serve drinks) you will forget to bring a corkscrew for the wine. I was unsure about how our party would operate without hiring a bartender. Upon arrival, I learned that the venue required us to supervise the alcohol, so we turned into bartenders. I loved it. We got tons of feedback from attendees while slinging beers and cupcakes.

    This community will surprise you. Speakers and volunteers, who donate their time to be part of WordCamps, will deliver tremendous value to your attendees. I saw Davis Shaver, Shayna Diamond, Jason Coleman, and Sal Ferrarello each sit behind our Happiness Bar in addition to preparing and giving talks. Our lead volunteer, Ruth Skutt, did way more than wrangle volunteers, and she was a big part of why our teardown and cleanup of the venue and setup of the after party happened quickly. Volunteer Kevin Cristiano needed to do some midday computing and decided to sit at our registration table long after we had dismissed volunteers and soft-closed registration.

    Where I Was Able To Add The Most Value

    Knowing My City

    You can provide a lot of comfort and reduce travel anxiety by providing advice to those who are coming from out of town. I identified the closest craft beer bottle shops to the train station for a speaker who was traveling from NYC. I was able to ask my Facebook friends which bars have karaoke on Saturday nights because WordPressers love some karaoke. I recommended restaurants to multiple groups of people.

    The pages and posts on your WordCamp website will benefit camps in the future because the old sites stay online. I was able to look back at all our previous sites (2016, 2015, & 2014) to glean clues as to what type of content we should publish. I simply iterated on the travel info and venue pages that were published by my predecessors. I wrote two posts that should benefit future events: the best (also: all) hotels in the city, and what to do Friday night for those arriving the day before.

    Miscellaneous Graphics

    I didn’t design our logo. I wish I could take credit for it, because it is awesome and I have huge respect for monochromatic marks. Dustin designed it. (He designed our wapuus, too!) I did, however, use our logo in graphics that announced our venue and after party venue. I also created the signage that we hung at the venue to identify and post schedules outside the rooms.

    Follow-Ups

    So much of event planning is diligent communication. Whether a sponsor had failed to provide a mailing address that was required for us to issue an invoice, or an attendee had asked a question I had already answered twice, each missive that I handled and archived was one less context-switch that one (or more!) of my teammates would experience. One of the largest time sinks for my executive on the beer festival is dealing with the beer distributors from which we source all the kegs. In more than one of our weekly videoconferences, Rami had asked us to drop into the email account and handle any items that we could. Responding to emails lead to me learning how to wrangle and invoice sponsors, a perfect example of how answering emails isn’t just answering emails.

    Tweets

    Doing Twitter

    I don’t think I am very good at writing tweets, but I wrote some tweets for @WordCampLanc. The account is run by several organizers. If you can be a cheerleader on twitter, you can create a buzz for anything, especially a WordCamp. This doesn’t translate over to the beer festival so much because craft beer people don’t use twitter as much as the WordPresserati. I have simultaneously published a companion piece containing some tips for marketing an event on Twitter that contains a bunch of WordCamp and beer festival tweets as examples.

    Our volunteer photographer, Doug Stuart, had the great idea to share the photos he captured with me in near real-time. I created a Dropbox folder for him at 7:55am, and he periodically filled it with photos so that I could use them in tweets throughout the day. It worked swimmingly, and I am definitely going to try to bring this concept to the beer festival. (Doug took every photo in this post.)

    Thank You

    I will be forever grateful for the opportunity to contribute to this awesome event, and I know I am a stronger person for having done so. I hope this post helps anyone who was in my position just a few months ago and is wondering what kind of challenge they have just accepted.

    “The biggest challenge after success is shutting up about it.”
    -Criss Jami

  • Beer can labels for St. Boniface

    Beer can labels for St. Boniface

    https://www.instagram.com/p/BN1qDbfD3iQ/?taken-by=stbonifacebrew

    https://www.instagram.com/p/BNHUst6Df_F/?taken-by=stbonifacebrew

    St. Boniface Craft Brewing Co. is releasing some very limited 16 ounce cans lately, and they asked me to re-imagine their can label (not designed by me) for these special releases.

  • How to extract passwords from Core FTP LE

    If you are like me and have maintained a copy of Core FTP LE simply because there is no easy way to extract passwords from the application, follow these instructions to set yourself free.

    No download or payment required

    A lot of the solutions available cost money or require you to install software. This is no longer necessary, and you can thank me in a moment.

    Instructions

    Find the encrypted passwords in the Windows Registry

    1. Open the Registry Editor
      1. Windows 10: Press the Windows key, type regedit, and press enter
      2. Older Windows: Go to Start, Run, type regedit, and press enter
    2. Find the numbered site profiles saved in HKEY_CURRENT_USER\SOFTWARE\FTPWare\CoreFTP\Sites. Each site holds the label with which you are familiar in the key called Name.
    3. Copy the encrypted password that is saved in a key called PW.

    Decrypt the password using a web page

    1. Go to http://aes.online-domain-tools.com/
    2. Choose these settings
      1. Input type: text
      2. Input text: [the encrypted password you found in the registry]
      3. Plaintext or Hex: Hex
      4. Function: AES
      5. Mode: ECB
      6. Key: hdfzpysvpzimorhk
      7. Plaintext or Hex: Plaintext
    3. Press the decrypt button

    You will see output that looks like this:

    38	30	38	36	37	37	37	31	37	30	00	00	00	00	00	00
     	 	
    8	0	8	6	7	7	7	1	7	0	.	.	.	.	.	.

    The password in this sample output is 8086777170. Wash, rinse, and repeat for all the site profiles you find in the registry. Profiles that have no saved password will have no content in the PW key.

    If this saved your life, consider buying me a beer. My Paypal is [email protected].

    When I stopped using CoreFTP, I moved on to FileZilla. I needed an FTP client that worked on both macOS and Windows to make life easy.

  • Lititz, Pintsylvania

    Lititz, Pintsylvania

    I designed this to be printed on apparel and sold at the Lititz Craft Beer Fest, where all profits are donated to charities.

  • Lititz Homebrew Competition 2016

    Lititz Homebrew Competition 2016

    An 11×17 poster for the Lititz Craft Beer Festival Homebrew Competition, 2016. I was delighted to find one of these hanging in Dosie Dough bakery when I had not yet known they had been printed.