Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8984723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T21:10:34+00:00 2026-06-15T21:10:34+00:00

TL;DR Hello, is there any way to get wordpress the_permalink on script something like

  • 0

TL;DR
Hello, is there any way to get wordpress the_permalink on script something like echo and load it on jquery with working on all posts separately?

Long version:
Hello, In wordpress I’m trying to make my posts look like image thumbnail and when I hover over them it shows the title and category of the post. And how i’m doing that is when i hover the div that has image_thumb .show script runs. I want it to make like when i click on any place of the image it goes to the post link. and when i click on the category it goes to category. since i cannot use another link inside link. i made the imagethumb div go to links with “.click function” but i can’t use because java cant directly run php. So is there anyway i can get the correct link maybe like echoed somewhere and get the link and load it?

here’s my jquery:

$(document).ready(function(){
            $(".select").hover(
                function(){         
                    $(this).find('.caption').fadeIn(500);
                },          
                function(){
                    $(this).find('.caption').fadeOut(500);
                }
            );
      $(".select").click(function(evt){
    window.location = '<?php the_permalink(); ?>';
});
        });     
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T21:10:35+00:00Added an answer on June 15, 2026 at 9:10 pm

    There should be more elegant solution, but a quick roundup is to use server-side code to export your required link as a “data-blablah” attribute of this div, then use jQuery to catch it.

    For example, a link may look like <a href="original/path" title="blah" class="select" data-permanlink="wanted/path">

    Then you can use jQuery to catch this attribute and header to it, something like this:

    $(".select").click(function(evt){
        var newlink = this.attr('data-permanlink')
        window.location(newlink)
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi is there any way I can get FileInputStream to read hello.txt in the
Hello I´m trying to automate AZURE VM management like Amazon EC2. Is there any
hello i would like to know if there is any dll or global hook
Is there any way to to interpret a string such as hello\r\n\world into a
Is there any way I can get the SMTP server greeting message using the
Is there any way to get the custom attributes of a specific object I
Hello I am looking to see if there are any modules for drupal 6
Is there a way to get the string between.. lets say quote The problem
Some introduction: Hello, i wanted to ask, if there is an easy way, to
Is there any way to reference an inferred type in TypeScript? In the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.