• Resolved jonathanrama

    (@jonathanrama)


    Hi team. i want that the general listing page when selecting a category + a location (rtcl_category + rtcl_location) regenerates a SEO title with both taxonomies.

    I have tried to insert this code in functions.php but it does not work. can you confirm what to put? thanks.

    add_action(‘init’, ‘rtcl_url_rewrite’); function rtcl_url_rewrite(){ if ($id = Functions::get_page_id(‘listings’)) { $url = home_url(); $link = str_replace($url, ”, get_permalink($id)); $link = trim($link, ‘/’); add_rewrite_rule(“$link/([^/]+)/([^/]+)/?$”, ‘index.php?page_id=’ . $id . ‘&rtcl_category=$matches[1]&rtcl_location=$matches[2]’, ‘top’); } }

Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘rtcl_category + rtcl_location regenerates a SEO title’ is closed to new replies.