Help needed with Badges / Shortcodes / Links

This topic contains 12 replies, has 3 voices, and was last updated by  Naveen Giri 4 years, 5 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #537398

    Daniel
    Lifetime Member
    Post count: 11

    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
    Daniel

    #537412

    Alex Rollin
    Moderator
    Post count: 27815

    1

    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.

    #537475

    Daniel
    Lifetime Member
    Post count: 11

    Hi 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?

    #537523

    Alex Rollin
    Moderator
    Post count: 27815

    Ah, I’m sorry, I have asked the developers to look into that, thanks for your patience.

    #537598

    Naveen Giri
    Moderator
    Post count: 1559

    Hi 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
    Naveen

    #537600

    Daniel
    Lifetime Member
    Post count: 11

    Hi Naveen,
    thanks. Where i put in the “add shortcode”?
    Daniel

    #537602

    Naveen Giri
    Moderator
    Post count: 1559
    #537607

    Daniel
    Lifetime Member
    Post count: 11

    Ok, 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.

    #537608

    Naveen Giri
    Moderator
    Post count: 1559

    If 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

    #537613

    Daniel
    Lifetime Member
    Post count: 11

    Ok. 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.

    #537619

    Naveen Giri
    Moderator
    Post count: 1559

    Hi Daniel,

    we will reconsider it and check it further.

    Thanks for your patience.

    #537732

    Daniel
    Lifetime Member
    Post count: 11

    Hi Naveen,

    i would appreciate it very much.

    Daniel

    #540663

    Naveen Giri
    Moderator
    Post count: 1559

    Hi 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

Viewing 13 posts - 1 through 13 (of 13 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount