-
PayPal WooCommerce return URL
Under Website Selling Preferences turn on Auto Return and the url for WooCommerce should be: https://yourdomain.com/checkout/order-received/?utm_nooverride=1
-
WordPress: Additional Admin Columns with ACF
In functions.php, add the following and change [post_type] for the post type of the table you want to alter. If you have used ACF, you can find the post type in the ur e.g. /wp-admin/edit.php?post_type=jobs // Add the custom columns to the [post_type] post type: add_filter( ‘manage_[post_type]_posts_columns’, ‘set_custom_edit_[post_type]_columns’ ); function set_custom_edit_[post_type]_columns($columns) { unset( $columns[‘author’] ); $columns[‘yourFieldKey’] […]
-
Custom posts per page on Archive and Search in WordPress
Add the following to Functions.php in your theme or child-theme amd alter the posts_per_page argument value. /** * Control the number of search results */ function custom_posts_per_page( $query ) { if ( $query->is_archive() || $query->is_search() ) { set_query_var(‘posts_per_page’, 12); } } add_action( ‘pre_get_posts’, ‘custom_posts_per_page’ );
-
Loop and Print Page Children Content in WordPress
This is ideal for when you need to loop through pages to create a list or grid of page content. Wordpress makes this pretty simple for posts, but it’s not so easy for pages. In this case I am trying to generate a list of all children of the “Ambassadors” page and create clickable links. […]
-
Releasing Content over Time / Drip Campaign with WordPress
Using the Date Registered field in WordPress you can create a page that releases content over time. In this example we are creating a Drip Campaign for content released in a specific category. In this example I have set up a category called “Campaigns” and within it I have added subcategories called Week 1, Week […]
-
Integrating Zurb Foundation with Sass into WordPress
1. Installing WordPress locally with a Child Theme. The first step is to install WordPress locally and setup a child theme. For more information on how to install and setup WordPress check out This Post. Both the style.css and functions.php files should look like the following: style.css /* Theme Name: Twenty Sixteen Child Author: Mammoth […]
-
WordPress: Multiple layouts in single.php, depending on post category
This snippet allows you to server different views depending on post category. if($wp_query->query[‘category_name’] == ‘categoryname1’) { include_once( ‘template1.php’ ); } else if($wp_query->query[‘category_name’] == ‘categoryname2’) { include_once( ‘template2.php’ ); } else { include_once( ‘template3.php’ ); }
-
Setting up WordPress
Download and install WordPress Go to wordpress.org/download Transfer the WordPress files to your local host Open MAMP and turn on the servers Go to Applications/MAMP/htdocs Create a new folder called ‘My WordPress’ and transfer the downloaded files into this folder Create database In your browser, go to localhost/phpMyAdmin Open the ‘database’ tab and create a […]
-
Correct WordPress Folder & File Permissions
In terminal, use the following code to set the file and folder permissions: chown www-data:www-data -R * # Let apache be owner find . -type d -exec chmod 755 {} \; # Change directory permissions rwxr-xr-x find . -type f -exec chmod 644 {} \; # Change file permissions rw-r–r– source: http://stackoverflow.com/questions/18352682/correct-file-permissions-for-wordpress