Checking all wp_posts for a specific string: SELECT id, post_title, post_status, post_type, SUBSTR(post_content, LOCATE(‘your search string’, post_content) -1, 100) FROM wp_posts WHERE locate(‘your search string’, post_content) > 0
Client needs to automatically import data from a Google spreadsheet into a Custom Post Type. I wrote up a quick (largely borrowed) python script to convert to Google Spreadsheet to a CSV file with the desired headers. Found this pro plugin from Smackcoders called WP CSV Import Pro, which can run the CSV to CPT … Continued
So I started with a super minimal .travis.yml configuration file: sudo: false language: php php: – ‘7.1’ How could that fail, right? Not. Travis needs something to do, so it defaults to running phpunit and if you run phpunit without any tests in place you get an error. So there needs to be some kind … Continued
http://gitready.com Introduction to Git with Scott Chacon of GitHub
As a freshman in Roots.io University, I’m still flying by the seat of my pants. Backing up website database and files to Amazon s3 as Ben Word does seems like a more interesting approach than using a service like Updraft Plus, Jetpack or Infinite WP, so I’m giving it a go. Beginning with Ben’s configuration … Continued
Trellis, as of sometime in 2016, simplified the way users it generates the MySQL database and user: USER will be named example_com DATABASE will be named example_com_environment If you, as I had done, end up changing site name in one place or another you may get a message that Ansible couldn’t connect to the database, … Continued
Could this help?
Our style sheet was making a call to @import url(‘https://fonts.googleapis.com/css?family=EB+Garamond:700′); for styling the typeface for a single shortcode generated banner. First tried just putting the @import statement between <style></style> tags, but this was ineffective. Fortunately Stack Overflow had a link to this awesome article by Stephen Scaff illustrating how to use Font Squirrel’s Webfont Generater … Continued
There is a pretty old, rickety WP site that I want to migrate some data from to a new WP install. There are “instructors” who are “pages” with a parent page. There are a couple of free/commercial plugins: WP ALL EXPORT and WP ALL IMPORT, but they really want you to pay $99 each, if … Continued
git config –global merge.conflictstyle diff3 git merge –abort Thanks Chris Angelico Remote deleting files over ssh. Cool.