Embed HubSpot Form in WordPress, Customize CSS, and Hide Fieldset Margins on Hidden Fields [code snippet]

When you embed a HubSpot form on an external site you can add css: ‘ ‘ to the embed code to remove the default form styles. If you have hidden fields the fieldset could have a margin or padding applied from your website stylesheet. This is common because you want a fieldset to have some… Read more »

Continue Reading

Category: Code Snippets

WooCommerce Product Category and Terms Select Filters [code snippet]

The code below will help you add a form select filter for Woocommerce online shop on WordPress.

   

Continue Reading

Category: Code Snippets

Add Custom Info Widget to WordPress Admin Dashboard [code snippet]

The snippet below helps you customize the default WordPress admin dashboard. Sometimes the dashboard contains too much information and you want to simplify it for you or your clients. The code below will help you hide existing widgets and add a custom one. In this example I added a user guide to help new users… Read more »

Continue Reading

Category: Code Snippets

How to Redirect WWW to non WWW WordPress [htaccess snippet]

Below are two code recipes for your htaccess file to redirect different versions of your domain. Once you have things added you can use this redirect testing tool to verify all the versions of your domain are redirecting properly.

Continue Reading

Category: Code Snippets

Scale Up and Crop an Image WordPress [code snippet]

In WordPress you may need to increase the size of all thumbnails but WordPress does not res up the images to prevent distortion. Using the method outlined in this example you can use object-fit to make undersized images fit your desired aspect ratio. .img-crop__polyfill image is sized to the desired dimensions. This will help keep… Read more »

Continue Reading

Category: Code Snippets

How to Migrate a HubSpot Blog to WordPress

If you are looking for a way to migrate your HubSpot blog to WordPress there isn’t a one click option unfortunately. However, by following the steps below you can create a CSV file of the data to import into your WordPress site. Export HubSpot blog data to import into WordPress

Follow these steps: Create… Read more »

Continue Reading

Category: Tutorials

How to Get a List of WordPress PDF, Image, Post, or Page URLS

Below are two PHP scripts you can use to help get a list of URLs of content in your WordPress site. I use these when I am migrating posts or media library files to another sites without using a plugin. Follow the steps below to use these scripts Open a text editor and copy and… Read more »

Continue Reading

Category: Code Snippets

How to Setup a Virtual Server Using Wamp

Create your project directory c:/wamp/www/project-name Open Wamp & Click Add a Virtual Host Fill out both of the inputs outlined in read enter the name of your site. I use projectname.test Enter the path to the directory you just created in step 1 Clear Hosts DNS Cache Open command line and enter ipconfig /flushdns Restart… Read more »

Continue Reading

Category: Common Questions

How to Export & Import mysql Database from Command Line

I was recently working on creating a local instance of a WordPress site and was using Wamp. When I was importing the database it was throwing an error (mysql error 2006 mysql server has gone away) because the packet size was too large. I used the command line to import the database and increase the… Read more »

Continue Reading

Category: Common Questions

How to Redirect Known Pages and Wildcard for Everything Else with htaccess

I recently worked on a project which needed me to shut down a WordPress blog and migrate it’s content. I had about 20 posts and pages that were going to migrate but everything else was going to be deleted. Since htaccess runs their commands from the top to the bottom, place your known redirects above… Read more »

Continue Reading

Category: Code Snippets