Support is currently limited. See our hours of operation.

This help desk is no longer actively support. We have switched to a ticketing system to more smoothly manage support, and free up development time. Your newly created tickets won't be available here. You will instead have an email history of your new tickets.

We are working on moving everything current and helpful from public tickets into the docs. This will be a long process and in the meantime, public tickets will remain searchable.

Your private tickets will remain available to you indefinitely. See your old tickets.

Help Desk

Change title depending on the variable on the formidable form

Labels

This Ticket is public

Notifications

I have over 100 models on a website, when you load up the page, it takes the ?id=2323 in the address bar, and displays all the information about a person.

How can I take that information and change the title of the page for seo purposes.

Would this require custom code in the functions.php page, or perhaps javascript etc.... or is their a short code for this sort of senario, any help would be hugely appreciated.

cheers, Shaun

The only time Formidable has control of the page title, is when you create posts and set which field is used for the title. Beyond that, the title isn't under Formidable control.

Here's a hook you can use to modify the title before it is shown on a page.
https://codex.wordpress.org/Plugin_API/Filter_Reference/the_title

After almost 2 years of trying to get this to work, success yesterday.

Here's the code that others might find helpful if they run into the same problem.

//yoast wpseo_title
add_filter('wpseo_title', 'filter_product_wpseo_title');
function filter_product_wpseo_title($title) {

global $wpdb, $frmdb;
$db = mysqli_connect('localhost', '#####', '#####', '#####');
$id = $_GET['id'];
$stage_name = 225;
$city = 2342;

if( is_page('#####-reviews') ) {

if($result = $db->query("SELECT * FROM wp_frm_item_metas WHERE item_id=".$id." AND field_id=225 ")){

if($count = $result->num_rows) {

while ($row = $result->fetch_object()) {

//print_r ($result);

$stage_name = $row->meta_value;

}
}
}

if($result2 = $db->query("SELECT * FROM wp_frm_item_metas WHERE item_id=".$id." AND field_id=2342 ")){

if($count = $result2->num_rows) {

while ($row = $result2->fetch_object()) {

//print_r ($result2);

$city = $row->meta_value;

}
}
}

$title = $city . " ##### - " . $stage_name;

}

return $title;
}

Ticket closed.