Theme Name: Turbo – Alike – Any Post Comparison WordPress v2
Author: RedQ Team
Author URI: RedQTeam.com
License: GNU General Public License v2 or later
License URI: License
Alike is a WordPress post comparison plugin. It will work with any post types or custom post type. e.g. property, cars, products anything.
This plugin comes with a very flexible logic builder. Where you can add any data you want to add for comparison table display.
You can set any custom taxonomy, terms and custom meta data for building the dynamic post compare logic. Best solution for any kind of directory listings WordPress site.
If you need any help please contact us through redqsupport.ticksy.com
In the new version v2 we make a new data builder for comparison logic. With this now you can add grouping and many thing that was not there in earlier version v1.
For this first you need to go to wp-admin dashboard. Navigate to the dashboard menu Alike.
You will see the screenshot below. First you need to select the post type you want to add for comparison.
Click the + icon and select your post type.
After selection you will see the post type lists before the + icon.
Now you can add any comparison data logic into any post type as you want to.
For add the comparison header you need to add a set, and enable the header group true.
In the group you can add a title and click save. After that you can add your row inside that header group.
Add row to the add set header group:
There are four display type available in the front-end preview options.
- WooCommerce Price
Most of the time you need to set it to simple. But if you want to display any meta value to a star rating icon. then you will need to select the display type to rating.
for boolean meta value if you want to show as a checked mark or not checked mark icon you need to select the boolean type.
and last WooCommerce price if you have WooCommerce installed in your WordPress then you can turn any integer number value into nicely formatted price value with currency sign default set by WooCommerce.
This option is available from the version 2.0.1. This will preview the custom meta URL field as a button inside
This is the front-end compare page preview for the hyper link settings.
In the alike admin panel settings there is a new display type in the row settings
hyperlink. Click that radiobox. See the attachment screenshot.
You can set button referral URL after the meta URL data. Button custom text, button custom CSS class and button target
For the button type display make sure you have also disable the custom scrollbar option.
This option is available from the version 2.0.6. This will allow you to set the custom height for each row in the compare page.
By default the height is set to 55px. But if you have large content to show then you will need to set the row height from the backend.
Set your height in each of the row settings.
In the new version settings panel will look like the preview screenshot down below this text.
You can define image size. Maximum posts to be added in the compare widget. And the alike preview redirection page with [alike_preview] shortcode.
Add Compare Link:
We came up with very handy shortcode for making this plugin easily manageable. If you want to insert the “add to compare button” into any post type just simply copy paste the short-code inside the editor.
[alike_link]. It will add the corresponding button in the post single page.
You can also change the button text and have the facility to add custom icons, instead of showing text.
You can also call the shortcode inside wp_loop
<!--?php echo do_shortcode('[alike_link text="compare" preview="text" icon_class="ion-arrow-swap" parent_class="custom-css-class" post_id="null"]'); ?-->
You don’t need to call all of the shortcode attribute inside this shortcode.
All default settings has be set by default. Use any of this attribute if you want to change the default options.
Preview: text, icon, text_icon, icon_text.
Default preview mode is text.
Also you can place the html structure anyplace inside wp_post_loop
<a class="alike-button alike-button-style" href="#" data-post-id="<?php">" data-post-title="<!--?php echo esc_attr( get_the_title() ) ?-->" data-post-thumb="<!--?php echo esc_url( $post_image_src ) ?-->" data-post-link="<!--?php echo esc_url( get_the_permalink() ) ?-->" title="<!--?php echo esc_attr($value) ?-->"> <!--?php echo ($show_icon) ? wp_kses('<i class="'.$icon_class.'"></i>') : esc_attr($value) ?--> </a>
NOTE: Make sure you have the
alike-button class name for add to compare button.
Add compare link inside post loop:
First of all you will need to decide which post type you want to compare with alike plugin.
Then you will build your comparison logic in the backend. Then you will need to add the add to compare link button.
You can directly call the [alike_link] shortcode button inside your main post loop.
Open your post type archive template in the editor. e.g. archive-post_type.php
Inside of it there is the main wp post loop query.
// The Loop while ( have_posts() ) : the_post(); // Here you can add your alike link shortcode // for do this see the code echo do_shortcode('[alike_link]'); endwhile; // end loop
Add Comparison Page:
This page will automatically created while the plugin activation. You don’t have to worry about this page. But if you want to place any page template just use the
You can set maximum items to compare at a time from the settings page.
Example screenshot image
This page will load the post based on the url ids.
NOTE: Make sure you properly add this page in the
Alike Widget. Otherwise it will not redirect the comparable post from the widget.
You can override the shortcode template into your theme. If you want to change the shortcode design. Just simply create
alike folder into your themes.
See the plugin
alike-templates folder structure. You can put the files with same folder and name with the extension.
When you click the add to compare link. The item will be added to your compare basket. Once you are done adding your item for comparison, just simply click the compare button and it will redirect to the alike preview page with the corresponding post ids.