Diego
Forum Replies Created
-
AuthorPosts
-
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' );
Once again problem solved. It works perfectly. 🙂
A million thanks for everything!!!
Diego C.
I have tried changing the slug to different versions, also changing the initial configuration of the CPT and deactivating and activating the plugin, and it still does not work.
I could in the worst case restore a backup of the site, although it would be a very drastic option and I would lose part of my progress.
Maybe some kind of record in the database is missing so it does not find “gd_place”.
Could we try to find another solution that was not to reestablish the site?
Thank you very much in advance
This reply has been marked as private.This reply has been marked as private.That’s just Stiofan. Problem solved, it works perfectly.
An inappropriate modification was made to the original code, a bad and irresponsible programming practice that should not have been done.
A million thanks to you and the rest of the team for your patience and help, and a cordial greeting.
Diego C.
This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.This reply has been marked as private.Perfect. I think you can now access. Thanks
This reply has been marked as private.This reply has been marked as private.Thanks for your quick response!
It was what I supposed. I wanted to add a structure I had generated for some pages with pagebuilder, which consists of some images and texts with certain structure and styles.
Surely I will try to copy part of the html code generated by the pagepuilder to embed it where the shortcode is, it is not the most sophisticated solution but it can be useful for the moment.Thank you very much!
-
AuthorPosts