Custom Affiliation is a powerful WordPress plugin designed to help users effortlessly showcase affiliate products on their websites. Whether you're an affiliate marketer or a blogger wanting to monetize your website, this plugin provides a comprehensive solution for adding and managing affiliate products in an engaging and organized way.
Table Of Contents
With Custom Affiliation, users can add affiliate product details, links, images, and descriptions, all within an easy-to-use interface. The plugin includes various customization options to ensure that affiliate products are presented in a visually appealing format that matches the design of your website. The Custom Affiliation plugin helps website owners boost their affiliate marketing efforts by providing tools to create clear, detailed listings that engage visitors and improve conversion rates.
Consider a blogger who reviews different tech gadgets and wants to monetize their content by showcasing affiliate products directly on their website. By using the Custom Affiliation plugin, the blogger can effectively promote these products while maintaining a consistent website design.
Step 01: First we have to go to the WordPress dashboard.
Step 02: Then we have to click the Plugins option from the dashboard. Then we have to click “Add New Plugin” button , from there we have to click “Upload Plugin”. Then we have to choose the plugin from our device. Then we have to click install button. Here we can Active The Plugin or we may active it later from Plugins options
Step 03: After activation we will see two new options called “Create Aff. Item” and Aff. Options at the dashboard like below
Step 04: Clicking on Create Aff. Item we will see few more option like below
Step 05: Clicking on Add Item We can add affiliate item like below
Step 06: In this way we can add as much as items we want , then we have to click second option Aff. Options , clicking on it we will see few more option like below
Step 07: Then we have to click Add View and add affiliate title and customize the container size and columns number and publish to get the affiliate shortcode
Step 08: Then we have to copy this shortcode and create a page and paste the shortcode like below
Step 09: Now if we publish the page we will see our view page like below
Use our recommended page builder plugin, FancyPost to unlock a number of powerful blocks to help you to design amazing websites!
Click the button below to explore a live demo of the Custom Affiliation plugin. Experience how you can easily showcase affiliate products in visually appealing formats, with integrated links and customizable designs. The live demo will help you understand how the plugin can elevate your affiliate marketing efforts, providing an organized and engaging way to display affiliate products.
Ready to boost your affiliate marketing strategy? Click the button below to download the Custom Affiliation plugin and start showcasing affiliate products on your website. With features like customizable product listings, integrated affiliate links, and responsive layouts, this plugin is the perfect solution to make your affiliate content more engaging and profitable.
The Custom Affiliation plugin is designed to be flexible and customizable, allowing developers to add features or modify existing ones to meet specific requirements. This section provides guidance on how to enhance and customize the plugin through custom coding, integration, and modification.
Developers can customize the look and feel of the affiliate product listings by overriding the default template files. To do this, follow these steps:
yourtheme/custom-affiliation/
). This allows you to make changes without affecting the core plugin code.Example Code to Customize Listing Layout:
<div class="affiliate-product-item">
<h2><?php the_title(); ?></h2>
<img src="<?php echo get_post_meta(get_the_ID(), 'affiliate_image', true); ?>" alt="<?php the_title(); ?>" />
<p><?php echo get_post_meta(get_the_ID(), 'affiliate_description', true); ?></p>
<a href="<?php echo get_post_meta(get_the_ID(), 'affiliate_link', true); ?>" target="_blank" class="btn btn-primary">Buy Now</a>
</div>
If you need additional information to be displayed for each affiliate product (e.g., product rating, discount, or availability), you can add custom meta fields.
Example Code to Add Custom Meta Fields:
function add_custom_affiliation_meta_boxes() {
add_meta_box(
'affiliation_details', // Unique ID
'Affiliation Details', // Box title
'render_affiliation_meta_box', // Callback function
'affiliate_product' // Custom post type for affiliate products
);
}
function render_affiliation_meta_box($post) {
$affiliate_discount = get_post_meta($post->ID, '_affiliate_discount', true);
echo '<label for="affiliate_discount">Discount (%):</label>';
echo '<input type="number" id="affiliate_discount" name="affiliate_discount" value="' . esc_attr($affiliate_discount) . '" />';
}
add_action('add_meta_boxes', 'add_custom_affiliation_meta_boxes');
function save_affiliation_meta($post_id) {
if (array_key_exists('affiliate_discount', $_POST)) {
update_post_meta($post_id, '_affiliate_discount', sanitize_text_field($_POST['affiliate_discount']));
}
}
add_action('save_post', 'save_affiliation_meta');
To enhance the functionality of the Custom Affiliation plugin, developers can integrate third-party APIs, such as price comparison or review services. Below is an example of how to make a simple API request:
function fetch_affiliate_data_from_api() {
$response = wp_remote_get('https://api.example.com/affiliate-product');
if (is_wp_error($response)) {
return; // Handle error appropriately
}
$data = json_decode(wp_remote_retrieve_body($response), true);
// Process and use the retrieved data
}
If you need to create customized versions of the affiliate product display, you can create custom shortcodes to handle different use cases.
Example Custom Shortcode:
function custom_affiliate_shortcode($atts) {
$atts = shortcode_atts(
array('id' => ''),
$atts,
'custom_affiliate'
);
$output = '';
$post = get_post($atts['id']);
if ($post) {
$output .= '<h2>' . get_the_title($post) . '</h2>';
$output .= '<img src="' . esc_url(get_post_meta($post->ID, 'affiliate_image', true)) . '" />';
$output .= '<a href="' . esc_url(get_post_meta($post->ID, 'affiliate_link', true)) . '" target="_blank">Learn More</a>';
}
return $output;
}
add_shortcode('custom_affiliate', 'custom_affiliate_shortcode');
You can also add your own styles to enhance the appearance of affiliate product listings. To do this, enqueue a custom stylesheet:
Example Code to Add Custom Styles:
function custom_affiliation_styles() {
wp_enqueue_style('custom-affiliation-styles', get_stylesheet_directory_uri() . '/css/custom-affiliation.css');
}
add_action('wp_enqueue_scripts', 'custom_affiliation_styles');
In your custom-affiliation.css
file, add styles to modify the look of affiliate product listings:
.affiliate-product-item {
border: 1px solid #ccc;
padding: 20px;
margin-bottom: 20px;
}
.affiliate-product-item h2 {
font-size: 1.5em;
}
.affiliate-product-item a {
background: #ff6600;
color: #fff;
padding: 10px;
text-decoration: none;
}
Search , install and active the Duplicate Page By mndpsingh287 plugin like below to make copy of similar types of Affiliate item
We are always looking to improve! If you have any suggestions for new features or improvements to the plugin, feel free to reach out to us. Your feedback helps us make Easy Job Listing even better.(Contact form , Telegram, Whatsapp, Messenger)
If you enjoy using Custom Affiliation and would like to support its continued development, please consider making a donation. Your contributions will help us add more features, provide regular updates, and continue offering support to all users.