Change Link for Projects, Employees

Hi,
I’d like to change the links of the 8 images’ titles on the projects widget. I want to lead people from the homepage to a seperate projects page, instead of leading them to the preset permalink.

i found the following Code:

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.atframework_projects_widget .project-title a').attr('href', 'https://example.com');
    });
</script>

Unfortunately this code leads all projects to one single page

The same Issue i have with the emploeeyes. How can i change oder delete the permalink set ?

Is there any easy CSS code that could do that?
Thank you so much!!

Hello @rogy,

You can modify that code to target only one ploject.

For example, this code will target only first project in widget:

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.atframework_projects_widget .project:nth-child(1) .project-title a').attr('href', 'https://example.com');
    });
</script>

This will target second project in widget:

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.atframework_projects_widget .project:nth-child(2) .project-title a').attr('href', 'https://example.com');
    });
</script>

…and so on. As you can see, only number in nth-child() changes. That number is the sequence number of a project in widget.

So, below is the code for 8 projects, but please remember to replace each link.

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.atframework_projects_widget .project:nth-child(1) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(2) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(3) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(4) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(5) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(6) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(7) .project-title a').attr('href', 'https://example.com');
        jQuery('.atframework_projects_widget .project:nth-child(8) .project-title a').attr('href', 'https://example.com');
    });
</script>

Something similar can be used for employees:

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.atframework_employees_widget .employee:nth-child(1) .employee-title a').attr('href', 'https://example.com');
    });
</script>

Kind Regards, Roman.

Hello @rogy @Roman ,
where did you @rogy find the permalink codes(mentioned below)?

<script type='text/javascript'>
    jQuery(document).ready(function(){
        jQuery('.atframework_projects_widget .project-title a').attr('href', 'https://example.com');
    });
</script>

and where should i add the codes you suggested @Roman.

Thanks

Hello @aashi,

I have already answered your question in your own topic.

Please let me know there if you need more help.

Kind Regards, Roman.

Dear Aashi

Thank you for the great answer:

here the link to the script:

Best Regards
r.

Ah sorry Roman

Thank you also for the great answer!!

It works perfectly.

Regards
R.

You are welcome @rogy!

I’m glad that it works :slight_smile:

Kind Regards, Roman.