Rewrite URL WordPress?

Question

Can you tell me how can this happen

  1. update URL as showing below.

https://dev/job/?job_id=hydnkdkskdn-J66NNJINJNj&JAQ=JKY6ubhsbhbhYYY

REPLACE WITH

https://dev/job/hydnkdkskdn-J66NNJINJNj&JAQ=JKY6ubhsbhbhYYY

i have a lot of job list url i have some code by one of my seniors it is in jQuery can i get your help how it will happen.

Code: window.location.href ="/job/?job_id=" + juq_val +
"&CUQ=" + cuq_val;

Code

jQuery(document).ready(function() {
    jQuery("select[name="sa_bereich"] option[value="HSG_Stelle_u"]").hide();
    jQuery("select[name="sa_bereich"] option[value="HSG_Ausbildung_u"]").hide();
    jQuery("select[name="sa_bereich"] option[value="HSG_Ausbildung_b"]").hide();
    jQuery("select[name="sa_bereich"] option[value="HSG_Stelle_b"]").hide();

     //remove table row 4 new group
      jQuery(".HSG_Ausbildung_bdata").remove();
      jQuery(".HSG_Ausbildung_udata").remove();
      jQuery(".HSG_Stelle_bdata").remove();
      jQuery(".HSG_Stelle_udata").remove();

    jQuery(".compana_linkid").each(function() {
         jQuery(this).on("click", function() {
         //alert('hello');
        showLoadIndicator();
        var juq_val = jQuery(this).attr("data-juq");
        var cuq_val = jQuery(this).attr("data-cuq");

  jQuery.ajaxSetup({
    cache: false,
    async: false,
    dataType: "jsonp",
    url: "https://jdb.compana.net/x/go",
    data: { cuq: cuq_val, json: 1, enc: "utf-8" }
  });
  jQuery.ajax({
    data: { x: "jobdetails", juq: juq_val },
    success: function(response) {
      // console.log(response.display);
      var desc = response.display.textmodule;
      var desc2 = response.display.googlejobs_data;
      
      var checkdata = desc2.description;
      //console.log(checkdata);

      var ajaxurl = wpSBSpinner.ajaxurl;
      var dataString = {
        action: "jobdetailsdata",
        Job_id: response.display.juq,
        Job_heading: response.display.titel,
        job_active_on: response.display.aktiv_von,
        job_active_to: response.display.aktiv_bis,
        Job_modified: response.display.modified,
        Job_place_work: response.display.arbeitsort_ort,
        Job_place_postcode: response.display.arbeitsort_plz,
        Job_work_country: response.display.arbeitsort_land,
        basic_salary: response.display.ba_salary,
        Job_salary_currency: response.display.joblift_salary_currency,
        description: desc,
        descriptionSchema: checkdata
      };

      var ajaxRequest = jQuery.ajax({
        url: ajaxurl,
        type: "POST",
        data: dataString,
        cache: false,
        async: false,
        dataType: "jsonp"
      });

      ajaxRequest.done(function(data) {
        console.log(data);
      });

      ajaxRequest.fail(function(data) {
        //window.location.href="/job-detail/?job_id="+juq_val+"&CUQ="+cuq_val ;

        window.location.href =
          "/job/?job_id=" + juq_val + "&CUQ=" + cuq_val;

      });
    }
  });
});
});
});
0
DK Thakur 3 weeks 2021-12-27T04:28:39-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse