Plugin

OTM Touring WordPress Theme for London Agency

OTM Touring WordPress Theme for London Agency

Another project created thanks to our partnership with http://goodiewebsite.com http://otmtouring.nyc is a UK and US based touring network related around music and artists.

WooCommerce YouTube Video Uploader – India’s Ropa

WooCommerce YouTube Video Uploader – India’s Ropa

WooCommerce and YouTube Integration

We’ve recently had an opportunity to create quite an interesting project. The client came asking whether or not I’d be able to create an automatic YouTube video uploader combined with WooCommerce products, created as WordPress plugin, the idea was to:

  1. Use the site uploaded video as the source.
  2. Upload the video to YouTube using YouTube API.
  3. Append the uploaded Video embed at the end of the WooCommerce product content.
  4. Shorten the product URL during the product creation.

Our idea to tackle the project was following:

  1. Use a URL shortening service to create short link and store it within a meta key of each product.
  2. Create separate page for YouTube authentication and store the authentication session until the default token expiration.
  3. If authenticated fetch the path of the media file and upload it to YouTube.
  4. In case of success append it to the end of the content.
  5. Flag the video (inside a meta key) as uploaded to avoid concurrent uploads.

The site may be found at https://www.indiasropa.com/. The attached gallery shows image samples of a simple Back End panel extension to create the result.

MrPoster Custom WooCommerce Plugin

MrPoster Custom WooCommerce Plugin

MrPoster is a Polish shop that simply sells posters. They’ve came to us asking whether or not we’d be able to help them out with their WooCommerce setup. The problem they were facing was related with fact that they had to use Photoshop to create poster visualizations (as in they had several mockups of indoor walls / furniture along with different poster image on each of the available poster sections). Given the amount of posters they had they were losing plenty of time to create such a visualization manually instead of focusing on their business.

Our idea was simple – we’ve used Advanced Custom Fields and Custom Post Types to do the job for them automatically. Each Product may be assigned a number of different mockups, then it’s Featured Image is used and placed based on co-ordinates of each mockup and automatically assigned as WooCommerce product gallery images.

Thanks to our simple to use interface they are now saving a lot of time and may focus on adding products they want to sell.

Apart from the above we’ve assisted them with domain setup and provided ongoing support related with their WordPress site’s performance.

See the related blog post if you have any comments / questions: https://wp-doin.com/2017/11/21/wordpress-plugin-development-approach/

Hotel Andante Site Updates

Hotel Andante Site Updates

We’ve recently completed several Front End and Back End related tasks for the Hotel Andante Website. The site is located at: https://www.hotel-andante-rust.de.

Our responsibitiles included:

  • Fixing Buggy Front End Mobile Views
  • Adding New, Mobile Menu
  • Adding new, custom Contact Forms
  • Adding Offers Page with Back End Management
  • Create a Mobile APP using Google Maps and Places API (https://www.hotel-andante-rust.de/en/location/)

The quote we have received for the project goes as follows:

For a hotel website with a template from themeforest, we had plenty of tasks to improve that template so that it’d fit our needs.WP-doin did a great job: They respond quickly, there is a good communication with them and they are real experts in WordPress. We will collaborate in future projects with them again and thanks for the good job!

 

ACF Recent Posts Widget (ACFRPW)

ACF Recent Posts Widget (ACFRPW)

Overview (Current Version 2.6.1 01/03/2018)

  1. About
  2. Requirements
  3. Installation
  4. Usage
  5. Settings
  6. ACF Supported Fields
  7. FAQ
  8. Shortcode
  9. Creating Custom Templates
  10. Complex Usage
  11. Plugin Filters
  12. Languages Supported
  13. Extending
  14. Request a Feature

About

ACF Recent Posts Widget (ACFRPW) is a WordPress plugin which adds a custom, extended Recent Posts Widget – with ACF and Meta Keys support.

See the plugin on WordPress.org for the full list of up-to-date features.

Requirements

  1. The plugin will not work on a theme that doesn’t support sidebars – Read more.
  2. Some plugin functionalities depend on Advanced Custom Fields plugin, consider installing the plugin. ACF 5 (Pro) is supported in Beta only. There are no guarantees that this plugin will work with pro version which takes its own track with every update.

Installation

  1. Go to Plugins -> Add New -> Upload and upload the .zip file that you have downloaded.
  2. Make sure that all plugin files lie in the acf-widget directory.
  3. Once installed, activate the plugin by clicking Activate.
  4. To use the plugin ACF features, please consider installing and activating the Advanced Custom Fields plugin.

Usage

ACFRPW adds a new widget to the Appearance -> Widgets -> ACF Recent Posts Widget. Most of the fields are quite obvious, you can choose from a set of settings to display the posts from. Each setting alters the amount and type of posts listed in the sidebar. Once added to the sidebar ACF Recent Posts Widget will appear.

Using the HTML textarea fields

These sections might not be obvious. The HTML or text before / after the whole loop setting is an area where you can specify custom HTML markup to be added before / after the whole posts list. The HTML or text before / after each post is an area where you can not only specify custom HTML, but you are also given an ability to print any meta key or certain ACF fields (see ACF supported fields).

Meta Key Name / ACF Usage

These fields need to be wrapped inside the {meta name} or {acf field_name} tags (which are similar to shortcodes). The plugin will then parse these fields and print their according value. Say we have a custom ACF field of type text, for which the Field Name is “text”. To print its value one has to use {acf text} inside the befoe / after each post textarea. A similar solution applies to the meta key.

Available Settings

The widget supports the following settings:

  • Widget Title
  • Custom Widget container CSS class
  • Option to ignore sticky posts
  • Search keyword query
  • Id based post exclusion
  • Date Display, Date Modified, Relative and Custom Date Format specifiaction
  • Listing posts from specific date period (start and end)
  • Listing posts with specific password, listing password protected posts only or excluding these
  • Post Type selection
  • Post Formats selection
  • Post Statuses selection
  • Listing posts limited to author via author id
  • Order specifiaction (ASC or DESC)
  • Orderby specification (ID, Author, Title, Date, Modified, Random, Comment Count, Menu Order, Meta Value, Meta Value Numeric)
  • Meta Key specifiaction (if Meta Value or Meta Value Numeric were chosen as orderby rule)
  • Meta Comparison selection
  • Meta Value Specification (for the Meta Comparison selection)
  • Category limitation
  • Tag limitation
  • Id based custom taxonomy limitation
  • Operator specifiaction for the above rules
  • Number of posts to show
  • Number of posts to skip
  • Thumbnail display, thumbnail size (width, height), thumbnail alignment, default thumbnail
  • Excerpt display, its word limit, its readmore text (occurs only if the amount of words exceeds the limit)
  • Custom HTML to display before the posts loop
  • Custom HTML to display after the loop
  • Custom HTML to display before each posts. It supports custom meta keys and ACF fields
  • Custom HTML to display after each posts. It supports custom meta keys and ACF fields
  • Custom and default CSS
  • Custom HTML templates

ACF supported fields

The plugin has been written and tested with ACF 4 (Free). Since version 4.1.5 ACF Pro is also supported, but there’s no guarantee to the code – it’s a Beta phase and will be kept as long as ACF Pro will not have any bigger differences between the ACF Free.

  • Text
  • Textarea
  • Number
  • Email
  • Password
  • Wysiwg Editor
  • Image
  • File

No other fields have been tested and are supported at the moment.

Frequently Asked Questions

Does the Plugin require Advanced Custom Fields?

No it doesn’t. Some functionalities will be missing though and a notification will be shown to the user on Plugins dashboard page.
What ACF version does it support?

The plugin supports the latest ACF 4.X.X version, currently ACF 5 is in Beta and not fully supported. However the plugin should work fine as long as there won’t be much differences between the two versions. If you want to get rid of the notice see: https://wordpress.org/support/topic/acf-5-compatibility-2
Does the Widget support author display?

No it doesn’t. We’re considering this as an update.
Does the Plugin support shortcodes, or custom posts function?

Yes, the plugin does support shortcodes since version 4.4.
Does the Widget come with any pre made classes to wrap the HTML with?

No it doesn’t.
The widget styles are messy and the thumbnail doesn't adjust its position ?

Please make sure to have the default styles checkbox checked.

SHORTCODE

From version 4.4 the plugin supports shortcode embeds. Given the amount of options and their specific names (as in shortcode attributes) the shorcode builder has been introduced
see 7th and 8th screenshots for the reference.

You’ll see a popup once clicked on ACFRPW button which gives one an ability to automatically set up the shortcode code for you. The rest follows all of the options specified here.

To use the shortcode one needs to have the WordPress editor enabled for the current page / post type. In case it was disabled (say via ACF) the button won’t appear.

CREATING CUSTOM TEMPLATES

From version 4.3 the plugin supports custom templates. To make usage of these one needs to make a copy of all the files found
in the acf-recent-posts-widget/templates directory and copy them over to the active template directory to acfrpw subdirectory.
The approach is similar to the way WooCommerce plugin works and has it’s drawbacks. With every new feature the files may be outdated.

Similarly to the widget template files, a separate, custom markup can be created for the shortcode build post listing. Copy the acf-recent-posts-widget/template files
to acfrpw-blog directory created inside your active theme directory.

TEMPLATE FILES

There are 3 main template files:

  • loop-after.php (which displays the markup after each of the posts and closes the markup container)
  • loop-before.php (which displays the markup before each of the posts and opens the markup container)
  • loop-inner.php (which is enqueued for each of the posts separatelly and contains the markup of every single post)

USAGE

The usage is quite advanced hence each template file contains a quite detailed documentation on how to use it.

First of all the template files mustn’t have the global variables removed. Each of these variables stores the widget settings, which are then used to generate the code.
Second of all the variable names are unobvious, loop-inner.php template file contains a list of all the names used, which are then extracted and available as php variables.

DIFFERENT TEMPLATE PER WIDGET / SIDEBAR

The templates allow one to adjust the markup of each single widget. One needs first to verify the widget id used, which may then be referenced.
The variable which stores the widget id is $acf_rpw_args[‘widget_id’]. Dumping the value in the template is the best way to find out which automatic id has been created for your widget.

The best way to handle the templates is to learn from their code. My personal suggestion is to copy over the templates to the current theme and work directly on them, doing one change at a time.
The templates require learning curve to use and there’s no single answer to everyones problem.

COMPLEX USAGE

This section covers plugin complex usage for advanced user willing to have more control over the behavior of the plugin as well as explains uncommon functionalities.

USING THE HTML TEXTAREA FIELDS

These sections might not be obvious. The HTML or text before / after the whole loop setting is an area where you can specify custom HTML markup to be added before / after the whole posts list.
The HTML or text before / after each post is an area where you can not only specify custom HTML, but you are also given an ability to print any meta key or certain ACF fields (see ACF supported fields)

META KEY NAME / ACF USAGE

These fields need to be wrapped inside the {meta name} or {acf field_name} tags (which are similar to shortcodes). The plugin will then parse these fields and print their according value. Say we have a custom ACF field of type text, for which the Field Name is “text”.
To print its value one has to use inside the befoe / after each post textarea. A similar solution applies to the meta key.

META VALUE USAGE

The Meta Value field supports an array of elements, so that all of the meta_compare parameters could be used. To do so, please specify the two parameters separated by semicolon, for instance: 1234;12345.
The plugin will convert these into an array and apply the proper operation for the two. Whatsmore the [date] shortcode can be used here. It takes the timestamp paramater as an argument, which is required – the possible arguments are the same as for
the function described here: http://php.net/manual/pl/function.strtotime.php. For instance [date +1 day] would generate the tomorrow date in “Ymd” format.
This can be used with custom meta field date.

PLUGIN FILTERS

The are several filters that can be used to enchance the plugin programatically:

  • ‘acf_rwp_query’ which gives one the ability to filter the query applied to each widget.
  • ‘acp_rwp_before’ which gives on the ability to filter the Front End output of the plugin before each post. There are two hooks attached here already which allow usage of the and [meta] shortcodes.
  • ‘acp_rwp_after’ which gives on the ability to filter the Front End output of the plugin after each post. There are two hooks attached here already which allow usage of the and [meta] shortcodes.
  • ‘acf_meta_value’ which filters the meta_value query parameter.

Check the acf_widget_widget file for the arguments and use cases.

DEPENDENCIES

OTHER

LANGUAGES SUPPORTED

Extending

Customizing ACF Recent Posts with filters

Request a Feature

By filling in the contact form you agree to our Privacy and Cookie policies.