Category Archives: WordPress

Downgrading WordPress

Have you ever updated to the newest version of WordPress, and then noticed that your site starts to have a bunch of problems? Don’t freak out. A lot of the times, it’s an issue with a plugin or theme that’s not compatible with the newest update. Sometimes (rarely) there’s an issue with the WordPress update itself. Whatever the case, one of of the quickest solutions to bring your site back to normal is to downgrade WordPress back to the previous version.

Compatibility issues are one of the reasons I try to avoid plugins and themes that don’t get updated regularly. I don’t want to be stuck with an older version of WordPress just because one of my plugins or themes doesn’t work with the latest update. Before you go through the process of downgrading, I’d suggest checking to see if a plugin is what’s causing the issue. If it is, you can just disable the plugin until there’s an update for it. If it’s a problem with the theme though, that’s an entirely different story. That’s when you’ll want to consider downgrading your version of WordPress.

Before you downgrade, I’d highly recommend making sure you have a backup of your site just in case things don’t go as planned and everything gets screwed up. I’ve never run into an issue but I always have the feeling that the one time I downgrade and my site goes berserk, I won’t have a backup. There are tons of backup plugins for WordPress and your web host might/should be able to provide you with the latest backup they have.

The first thing you’re going to need is a previous WordPress release. You can download any of the previous WordPress versions here –> backup plugins for WordPress. Only downgrade down to the version before the newest one. Don’t go way back into the archives to version 1.1. Some of the older versions of WordPress have security issues that could put your site at risk.

Here’s how to downgrade WordPress to an older version.

MANUAL WORDPRESS DOWNGRADE TUTORIAL

STEP 1: DEACTIVATE ALL YOUR PLUGINS

After you’ve created a backup of your site and downloaded the WordPress version you want to downgrade to, it’s time to actually downgrade. The first thing you want to do is login to your WP Dashboard and deactivate all of your plugins.
Deactivate-All-Wordpress-plugins

STEP 2: LOGOUT OF WORDPRESS

After all your plugins have been deactivated, logout of WordPress.

STEP 3: USE AN FTP CLIENT AND LOCATE YOUR SITE’S WORDPRESS FILES

This step will require that you have an FTP client. An FTP client allows you to access all of the files on your site. I use FireFTP from Firefox and FileZilla is another very popular option. Both are free and you can’t go wrong with either. The images in this tutorial are from FireFTP. In your FTP client, locate your WordPress files (wp-admin, wp-content, etc.). In FireFTP, they will be the first thing you see when you open your site’s folder.

STEP 4: DELETE THE WP-ADMIN AND WP-INCLUDES FOLDERS

Delete both the wp-admin and wp-includes folders. Do not touch the wp-content folder! You can leave all of the other files alone because you will overwrite them in the next step.

how-to-downgrade-wordpress-step-2

STEP 5: TRANSFER THE FILES FROM THE PREVIOUS WP VERSION TO YOUR SITE WITH FTP

While you’re still in your FTP client, go into the folder where you have the WordPress version you want to downgrade to. Transfer over everything except the wp-content folder. After all the files have been transferred, your downgrade is finished.

how-to-downgrade-wordpress-step-3

STEP 6: UPDATE YOUR WORDPRESS DATABASE

Login to your WP Dashboard. You will be prompted to update your WordPress database. Click on “Update WordPress Database” and then click continue to login.

update-wordpress-database

Once you’re logged in, you should see that you’re running whatever version of WordPress that you downgraded to. Congrats!

A word of caution. I don’t recommend using older versions of WordPress when newer ones are available. Like I said in the beginning, a lot of the updates come with security patches to stop known security threats that could leave your site open to hackers.

If your theme isn’t compatible with the most current version of WordPress, contact the theme developer and let them know. If there’s no support offered for your theme, then you’ll want to switch to a different one that’s updated on a regular basis.

Original article can be found here

WooCommerce Shortcodes

The first four shortcodes are used for special WooCommerce pages and are sometimes automatically inserted into the pages by WooCommerce during installation. They should not otherwise be used. All others can be used throughout and can be used more than once.

 

Shortcodes for WooCommerce sites only

Shortcode

Parameter

Meaning

woocommerce_cart

none

Shows the content of the cart page.

woocommerce_checkout

none

Shows the content of the checkout page.

woocommerce_order_tracking

none

Shows the user a form with which he can enquire about the status of his orders.

woocommerce_my_account

current_user, order_count

Shows the content of the user account page.

 

Non-specific WooCommerce shortcodes

Shortcode

Parameter

Meaning

recent_products

per_page, columns, orderby, order

Shows new products.

featured_products

per_page, columns, orderby, order

Shows featured products.

product

id or sku

Shows a single product.

products

ids or skus, columns, orderby, order

Shows several predetermined products.

add_to_cart

id or sku, style

Shows the price and the “add to cart” button of a single product.

add_to_cart_url

id or sku

Displays the URL of the “add to cart” button of a particular product in text form.

product_page

id or sku

Shows the detail page of a product.

product_category

per_page, columns, orderby, order, category

Shows the products in a category.

product_categories

number, orderby, order, columns, hide_empty, parent, ids

Shows existing product categories.

sale_products

per_page, columns, orderby, order

Shows products on offer.

best_selling_products

per_page, columns

Shows best-selling products.

top_rated_products

per_page, columns, orderby, order

Shows top-rated products.

product_attribute

per_page, columns, orderby, order, attribute, filter

Shows products with a particular attribute.

related_products

per_page, columns, orderby

Shows related products.

Note: The parameters orderby and order are WordPress-specific and are described in more detail in the Codex.

 

[woocommerce_cart]

Shows the content of the cart page and everything that comes with it; list of products in the basket, voucher entry, shopping cart total, Proceed to checkout button, product recommendation etc. This shortcode will be automatically inserted into the cart page when installing WooCommerce.

Parameter

  • none

Example

Crayon Syntax Highlighter v2.7.1

[woocommerce_cart]

1

[woocommerce_cart]

[Format Time: 0.0006 seconds]

 

[woocommerce_checkout]

Shows the content of the checkout page and everything that comes with it; invoice details, order overview Continue button etc. This shortcode will be automatically inserted into the checkout page when installing WooCommerce.

Parameter

  • none

Example

Crayon Syntax Highlighter v2.7.1

[woocommerce_checkout]

1

[woocommerce_checkout]

[Format Time: 0.0004 seconds]

 

[woocommerce_order_tracking]

Shows the user a form with which he can enquire about the status of his orders by stating the order number and email address. After entering the data, the customer is redirected to a page that displays the status and a summary of the order.

Parameter

  • none

Example

Crayon Syntax Highlighter v2.7.1

[woocommerce_order_tracking]

1

[woocommerce_order_tracking]

[Format Time: 0.0004 seconds]

 

[woocommerce_my_account]

Shows the content of the My Account page and everything that comes with it; overview of past orders, billing address and delivery address etc. The customer can also edit his data here. This shortcode will be automatically inserted into the My Account page when installing WooCommerce.

Parameter

  • current_user
  • default:
  • The customer whose My Account page is to be displayed.
  • This is determined automatically using the function get_user_by get_user_by( ‘id’, get_current_user_id() )
  • order_count
  • default: 15
  • Number of orders to be displayed, -1 for the display of all orders.

Example

Crayon Syntax Highlighter v2.7.1

[woocommerce_my_account order_count=”12″]

1

[woocommerce_my_account order_count=“12”]

[Format Time: 0.0005 seconds]

 

[recent_products]

Shows recently added products, sorted according to various criteria. For presentation purposes you can specify the number of products to be displayed per page and the number of columns.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: date
  • Sort key.
  • order
  • default: desc
  • Sort order.

Example

Crayon Syntax Highlighter v2.7.1

[recent_products per_page=”12″ columns=”4″]

1

[recent_products per_page=“12” columns=“4”]

[Format Time: 0.0006 seconds]

 

[featured_products]

Shows featured products, sorted according to various criteria. For presentation purposes you can specify the number of products to be displayed per page and the number of columns. Comparable to recent_products.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: date
  • Sort key.
  • order
  • default: desc
  • Sort order.

Example

Crayon Syntax Highlighter v2.7.1

[featured_products per_page=”12″ columns=”4″]

1

[featured_products per_page=“12” columns=“4”]

[product]

Shows a single product that is specified by the ID or the item number (SKU). Make sure the catalog visibility is not set to hidden or the product will not be shown. The ID of a product can be determined in the dashboard on the product page. It will be displayed when you hover the mouse over the product in the name column. You can find the item number in the Art.-Nr. column.

Parameter

  • id
  • default:
  • Product ID
  • sku
  • default:
  • Product item number

Examples

Crayon Syntax Highlighter v2.7.1

[product id=”99″]

1

[product id=“99”]

Crayon Syntax Highlighter v2.7.1

[product sku=”ART103″]

1

[product sku=“ART103”]

 

[products]

Displays several products, which are specified by their IDs or by their item number (SKU). Make sure the catalog visibility is not set to hidden or the product will not be shown. Comparable to product.

Parameter

  • id
  • default:
  • Product ID
  • sku
  • default:
  • Product item number
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: title
  • Sort key.
  • order
  • default: asc
  • Sort order.

Examples

Crayon Syntax Highlighter v2.7.1

[products ids=”1, 2, 3, 4, 5″]

1

[products ids=“1, 2, 3, 4, 5”]

Crayon Syntax Highlighter v2.7.1

[products skus=”ART12, ART22, ART50″ orderby=”date” order=”desc”]

1

[products skus=“ART12, ART22, ART50” orderby=“date” order=“desc”]

 

[add_to_cart]

Shows the price and the Add to Cart button of a product, which is specified by the ID or the item number (SKU). The style parameter can be used for formatting.

Parameter

  • id
  • default:
  • Product ID
  • sku
  • default:
  • Product item number
  • style
  • default: border:4px solid #ccc; padding: 12px;
  • Formatting

Example

Crayon Syntax Highlighter v2.7.1

[add_to_cart id=”99″]

1

[add_to_cart id=“99”]

 

[add_to_cart_url]

Displays the URL of the add to cart button of a particular product in text form. The product is specified by the ID or the item number (SKU).

Parameter

  • id
  • default:
  • Product ID
  • sku
  • default:
  • Product item number

Example

Crayon Syntax Highlighter v2.7.1

[add_to_cart_url id=”99″]

1

[add_to_cart_url id=“99”]

 

[product_page]

Shows the detail page of a product which is specified by the ID or the item number.

Parameter

  • id
  • default:
  • Product ID
  • sku
  • default:
  • Product item number

Examples

Crayon Syntax Highlighter v2.7.1

[product_page id=”99″]

1

[product_page id=“99”]

Crayon Syntax Highlighter v2.7.1

[product_page sku=”ART103″]

1

[product_page sku=“ART103”]

 

[product_category]

Shows the products in a category which are specified by their permalink (slug). You can find the permalink in the dashboard under Products → Categories in the column Permalink.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: title
  • Sort key.
  • order
  • default: desc
  • Sort order.
  • category
  • default:
  • Category slug.

Example

Crayon Syntax Highlighter v2.7.1

[product_category category=”musik”]

1

[product_category category=“musik”]

 

[product_categories]

Displays the product categories with the category image and if desired the number of products contained in each of the categories.

Parameter

  • number
  • default: null
  • Number of categories to be displayed. If null, then all are displayed.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: name
  • Sort key.
  • order
  • default: asc
  • Sort order.
  • hide_empty
  • default: 1
  • Specifies whether or not to display empty categories. 1 for yes, 0 for no.
  • parent
  • default:
  • If set to 0, only top level categories will appear.
  • ids
  • default:
  • The Ids of categories to be displayed. If not specified, all categories will be included.

Example

Crayon Syntax Highlighter v2.7.1

[product_categories number=”12″ parent=”0″]

1

[product_categories number=“12” parent=“0”]

 

[sale_products]

Shows the products that are currently on offer, sorted according to various criteria. For presentation purposes you can specify the number of products to be displayed per page and the number of columns.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: title
  • Sort key.
  • order
  • default: asc
  • Sort order.

Example

Crayon Syntax Highlighter v2.7.1

[sale_products per_page=”12″]

1

[sale_products per_page=“12”]

 

[best_selling_products]

Shows best-selling products. The number of products displayed per page and the number of columns can be specified here.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.

Example

Crayon Syntax Highlighter v2.7.1

[best_selling_products per_page=”12″]

1

[best_selling_products per_page=“12”]

 

[top_rated_products]

Shows top-rated products. Sorting according to various criteria possible.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: title
  • Sort key.
  • order
  • default: asc
  • Sort order.

Example

Crayon Syntax Highlighter v2.7.1

[top_rated_products per_page=”12″]

1

[top_rated_products per_page=“12”]

 

[product_attribute]

Shows products with a particular property and the specified values for that property. Sorting according to various criteria possible.

Parameter

  • per_page
  • default: 12
  • Number of products displayed per page.
  • columns
  • default: 4
  • Number of columns.
  • orderby
  • default: title
  • Sort key.
  • order
  • default: asc
  • Sort order.
  • attribute
  • default:
  • The property that the products must have in order to be displayed.
  • They will only appear if the parameter is used.
  • filter
  • default:
  • The value of the property the products must possess in order to be displayed.
  • They will only appear if the parameter is used.

Example

Crayon Syntax Highlighter v2.7.1

[product_attribute attribute=”farbe” filter=”schwarz”]

1

[product_attribute attribute=“farbe” filter=“schwarz”]

 

[related_products]

Shows similar products. Similar products are determined on the basis of categories and tags. This shortcode must be used within a product detail page.

Parameter

  • per_page
  • default: 2
  • Number of products displayed per page.
  • columns
  • default: 2
  • Number of columns.
  • orderby
  • default: rand
  • Sort key.

Example

Crayon Syntax Highlighter v2.7.1

[related_products per_page=”12″ orderby=”title”]

1

[related_products per_page=“12” orderby=“title”]

Caution: The per_page parameter specifies how many items to display on a page. The pagination function is not automatically generated. The per_page and columns parameters determine how many products and columns will be displayed. Whether this actually works and for which parameter values, is highly dependent on the layout of your theme. This requires some trial and error and reworking of the CSS.

The original documentation can be found on these WooThemes pages. Some shortcodes have been removed since WooCommerce 2.1.x. These shortcodes have not been described here. If required, you can also find them in the WooThemes documentation.