Thank you very much for all the information, it has been very helpful 🙂
I have managed to implement 2 functions. One for each CPT. Each one returns a URL of its corresponding listings, called “gd_place” and “gd_cursos” (with the particularity of being deleted, editable, etc. – This is great).
The separate URLs work fine, but now I’m trying to generate a third function that returns a URL that shows me the 2 CPT listings on the same page. I have obtained the concatenated URL that allows me:
“https://xxxxxx.com/author/xxxxx/?geodir_dashbord=true&stype[]=gd_place&stype[]=gd_cursos”, however, it appears that “no ads have been found that match your selection”, without any results.
The question is: Is there any way to display both CPT listings (“gd_places” and “gd_cursos”) in editable, removable, etc. mode on the same page? I can not think of any way..
Here I leave the third function, which allows me to obtain the concatenated link of the 2 CPT, but without any results.
function gd_add_my_listings_sc($atts) {
$defaults = array(
'stype' => array('gd_place','gd_cursos')
);
$params = shortcode_atts($defaults, $atts);
if (is_user_logged_in()) {
global $current_user;
$author_link = get_author_posts_url($current_user->data->ID);
$author_link = geodir_getlink($author_link, array('geodir_dashbord' => 'true'), false);
$listing_link = geodir_getlink($author_link, array('stype' => $params['stype']), false);
$listing_link = apply_filters('geodir_dashboard_link_my_listing', $listing_link, $params['stype'], $current_user->ID);
return '<a title="Mis Centros" href="'.$listing_link.'">Mis Centros</a>';
}
return "";
}
add_shortcode('mis_centros', 'gd_add_my_listings_sc' );