Help needed with Badges / Shortcodes / Links
This topic contains 12 replies, has 3 voices, and was last updated by Naveen Giri 5 years ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
March 30, 2020 at 10:34 am #537398
Hi *,
i like your product more and more … if you know the dependencies 🙂
yesterday is saw the post from Stiofan to the elementor update. https://www.facebook.com/groups/1041140559338764/permalink/2802301546555981/
He helped me out, but now i get stuck with some points.
1. No Links to detail pages
I only want to have a list of results. No links to the detail pages at the moment.
Was able to delete the link form image/logo shortcode, but i am not able to do this with the Title. This was not possible through the shortcode builder. i get the title field only with the title link tag. I also don´t find a solution in the dynamic field.
– Need a shortcode to have the Title of the Post without a link.2. No lightbox / Button for download
Make a file downloadable to a Button without open in a lightbox.
Now a download is open up in a lightbox. I would be nice to have a Button like the example “Visit my Website” https://wpgeodirectory.com/docs-v2/design/gd-badge/#examples (also as image attached) with a “target _blank” to the raw pdf file.
– Need a shortcode to have a button with the link to the file.3. Wrong German translation
where i can change the text for open now in business hours “Jetzt öffnen”? -> it must be “Jetzt geöffnet”4. Use build in WP Media Library
Is it possible to use the build in media library for images and documents. Now i upload the assets twice, when i want to use a image or something else outside of WP GD.Thank you for your help
DanielMarch 30, 2020 at 1:07 pm #5374121
You can use GD Post Meta to output fields without markup. Use the option to output the value, and then select ‘nowrap’ to output with tags.
Once you get that you can wrap it in a heading, too, if you want.
2
You can write your own HTML and then use the GD Post Meta for the file field to get the URL of the file. Then make the button you want.
3
For that you can submit a change to WP.org and also just make the change direct in the translation file.
https://wpgeodirectory.com/docs-v2/translation/overview/
To submit changes you go here: https://translate.wordpress.org/locale/de/default/wp-plugins/geodirectory/
4
It is not possible without a customization.
March 30, 2020 at 8:35 pm #537475Hi Alex,
1. done
2. link is not working.
my shortcode is looking fine in the frontend. But the link has build with the raw db stored data. so all links have a addition behind the .pdf. It was not possible to filter these to the raw or strip attribute.[gd_post_badge key=”speisekarte” condition=”is_not_empty” icon_class=”fas fa-book-open” badge=”Speisekarte” link=”%%input%%” new_window=”1″ bg_color=”#0073aa” txt_color=”#ffffff” size=”medium”]
html output
href=”https://*****_arte_HP1_klein.pdf|277||”how can i remove the addition?
March 31, 2020 at 1:51 am #537523Ah, I’m sorry, I have asked the developers to look into that, thanks for your patience.
March 31, 2020 at 2:32 pm #537598Hi Daniel,
You can use the below snippet to have a shortcode.
this shortcode will create a downloadable link for speisekarte.You can style the link based on your need.
[download_speisekarte text='Speisekarte' class='gd-badge' type='download']
add_shortcode( 'download_speisekarte', 'custom_callback_download_speisekarte' ); function custom_callback_download_speisekarte( $atts ) { $atts = shortcode_atts( array( 'text' => 'Speisekarte', 'class' => 'default baz', 'type' => '' ), $atts, 'bartag' ); ob_start(); global $gd_post; $speisekarte = geodir_get_post_meta( $gd_post->ID, 'speisekarte', true ); if( !empty( $speisekarte )){ $speisekarte_array = explode('|', $speisekarte ); if( !empty( $speisekarte_array[0] )){ echo '<div class="gd-download-meta-speisekarte">'; echo "<a href='". $speisekarte_array[0] ."'> <span class='gd-secondary'>{$atts['text']}</span></a>"; echo '</div>'; } } ?> <?php $content = ob_get_contents(); ob_end_clean(); return $content; }
Regards
NaveenMarch 31, 2020 at 2:36 pm #537600Hi Naveen,
thanks. Where i put in the “add shortcode”?
DanielMarch 31, 2020 at 3:05 pm #537602You can use below instruction
https://wpgeodirectory.com/docs-v2/faq/customizing/#snippets
and use this plugin
https://wordpress.org/plugins/code-snippets/March 31, 2020 at 3:19 pm #537607Ok, i will try.
Do you plan to fix the error in the Plugin itself? So i can use it directly with the shortcode and not with the snippet.
Would be very nice.
March 31, 2020 at 3:32 pm #537608If we will have more requests for downloadable link of custom fields.
we will surely consider it to be added in the GD plugin but for now, it’s a custom request.So you can use the snippet above.
Thanks
March 31, 2020 at 3:45 pm #537613Ok. Sad.
Because it works perfect as it is. The only thing is the %%input%% “filter” – that the output is “a little bit wrong”. If the output is fine, you have soo much opportunity with the shortcodes / Badges in general.
And i not prefer another plugin to resolve a link output. But this is my personal opinion.
March 31, 2020 at 4:17 pm #537619Hi Daniel,
we will reconsider it and check it further.
Thanks for your patience.
April 1, 2020 at 7:04 am #537732Hi Naveen,
i would appreciate it very much.
Daniel
April 16, 2020 at 3:02 pm #540663Hi Daniel,
Just to update you. It has been fixed and it will be up in the upcoming version of Geodirectory.
Thanks for your patience.Regards
Naveen -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket