Search page different title per results

For this to work, you will need to have your search results ordered by the post type. function order_by_pt($where,$qry) { if (is_main_query() && $qry->is_search()) { global $wpdb; $where = $wpdb->posts.’.post_type DESC’; } return $where; } add_action(‘posts_orderby’,’order_by_pt’,1,2); Then a Loop like this one will do what you want, if I understand you. $type_title=””; while (have_posts()) { … Read more

get id custom tables on current page

I am not sure that I understand the question but if $bab->id is the ID in the $wpdb->post table then get_permalink($bab->id); will give you the permalink for the page. If you are trying to get the ID of the page after you click those links, try: echo $post->ID; // or… $pobj = get_queried_object(); echo $pobj->ID; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)