Hi Timba,
Thank you for the mockup and sorry for the delay. Because I was stuck in draft.
Here is the custom JavaScript solution your could try.
- Install and activate the TC Custom JavaScript plugin
- Go To Appearance > Custom JavaScript
- Paste the following code into the provided box
(function($){
$.fn.projectAddButton = function(buttonText, buttonURL){
var button = '<div class="proj-button-wrapper"><a class="roll-button" href="'+buttonURL+'" target="_blank">'+buttonText+'</a></div>';
if( this.length ) {
html = button;
this.find('.project-inner').prepend(html);
}
};
// Add button to Project 1
$('.elementor-widget-athemes-portfolio .project-item:nth-of-type(1)').projectAddButton('Visit aThemes', 'https://athemes.com');
})(jQuery);
- Update
In the example above, to add a new button on the first project/portfolio item, use this line:
// Add button to Project 1
$('.elementor-widget-athemes-portfolio .project-item:nth-of-type(1)').projectAddButton('Visit aThemes', 'https://athemes.com');
What you need to do is replace the button text on Visit aThemes to your own. And change the the button link on the second parameter, that is https://athemes.com.
To do this on second portfolio item, add this new line:
// Add button to Project 2
$('.elementor-widget-athemes-portfolio .project-item:nth-of-type(2)').projectAddButton('Visit aThemes', 'https://athemes.com');
The second item selector is identified by :nth-of-type(2) pseudo selector. And adjust the button text and the link target.
The final code will look like this:
(function($){
$.fn.projectAddButton = function(buttonText, buttonURL){
var button = '<div class="proj-button-wrapper"><a class="roll-button" href="'+buttonURL+'" target="_blank">'+buttonText+'</a></div>';
if( this.length ) {
html = button;
this.find('.project-inner').prepend(html);
}
};
// Add button to Project 1
$('.elementor-widget-athemes-portfolio .project-item:nth-of-type(1)').projectAddButton('Visit aThemes', 'https://athemes.com');
// Add button to Project 2
$('.elementor-widget-athemes-portfolio .project-item:nth-of-type(2)').projectAddButton('Visit aThemes', 'https://athemes.com');
})(jQuery);
I hope thi helps and let me know in case you get any trouble with the code.
Regards,
Kharis
aThemes Support