[Support request] Tags are not showing in the pages

Home Forums Support [Support request] Tags are not showing in the pages

Home Forums Support Tags are not showing in the pages

Viewing 15 posts - 1 through 15 (of 32 total)
  • Author
    Posts
  • #2392126
    Oppo Gene

    Hi there, the tags are showing on my wp posts but not showing in the files/pages of wpdm plugin (WordPress Download Manager). As it is shown in this URL:”shorturl.at/IJLM1″, you can see tag x5 is showing in all the post experts, but when you visit the posts except (Post A), the tag will not show in that pages.

    Further, this is a third party plugin I have removed the download button from the player template using CSS:

    .wpdmdl-btn .wpdm-download-link{
    display: none
    }

    Can you guide or provide such css through which I can show tags in all download pages. I have done it before moving towards premium, adding css to theme functions, it just show x5 with link inside with no tag icon of GP, also guide the tags are shown after the content, how to change it position to before content/after breadcrumbs

    Thank You
    Looking Forward

    #2392670
    David
    Staff
    Customer Support

    Hi there,

    can you supply a normal URL as that shortURL isn’t working

    #2393361
    Oppo Gene
    #2393362
    Oppo Gene
    #2393759
    David
    Staff
    Customer Support

    Ok, for the Single page, you need to enable the entry meta for that post type.
    Add this PHP Snippet to do that:

    
    add_filter( 'generate_entry_meta_post_types', function( $types ) {
        $types[] = 'wpdmpro';
    
        return $types;
    } );
    

    Make sure that the wpdmpro is the slug of the post type you’re using.

    For the Tag archive pages, to include your custom post type you can use:

    
    function db_multi_post_type_tags($query)
    {
        if($query->is_main_query() && is_tag()){
            $query->set('post_type', ['post', 'wpdmpro']);
            return;
        }
    }
    add_action('pre_get_posts', 'db_multi_post_type_tags');

    In this line $query->set('post_type', ['post', 'wpdmpro']); make sure the wpdmpro is the correct post type.

    #2394756
    Oppo Gene

    Hi David, I have tried both the snippet, both are not working for the single page and other. WPDMPRO is main use on my website content, I just not want to show only one file tag, but all the files that are the post of WPDMPRO.

    Kindly check once the home page of my website, all the content is related to WPDMPRO Posts. Kindly guide how to enable given tags of all previous files and for the new ones also

    Thank You
    Looking Forward

    #2395086
    David
    Staff
    Customer Support

    Is the wpdmpro the correct slug for your custom post type?
    And did you leave the codes i provided in your site ?

    #2396411
    Oppo Gene

    Yes, I have done once more after your reply but still not working. Is it possible that you can have a look from your side on my website admin, if so, I will share the details on some personal email or others, so that you can handle it easily?

    #2396414
    Oppo Gene

    I also have the screenshots of the snippet you shared that are not working, but can’t share it due to no option regarding it

    #2396521
    David
    Staff
    Customer Support

    Read this doc:

    https://docs.generatepress.com/article/using-the-premium-support-forum/

    It provides a how to share screenshots and private information in this forum.

    #2400474
    Oppo Gene

    Hi David, I have tried again and enclosed the screenshots, you can check the given URL’s. Kindly guide how to resolve this by sharing actual required PhP for “WPDM”
    Further I have another Question about the theme, I am using Cloudflare APO, and there is an option for “Cache by Device Type”, should I enable it, Kindly check this article “https://community.cloudflare.com/t/cache-by-device-type-for-wordpress/231725”, “https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/”, also an screenshot enclosed regarding cache.

    (PhP)
    https://postimg.cc/kVPSMP1G
    https://postimg.cc/qNRbcy4y
    https://postimg.cc/yWKzmQ5R
    https://postimg.cc/188xmLgk
    https://postimg.cc/mz5Csz0f
    https://postimg.cc/ZWQS6TtY
    (Cache)
    https://postimg.cc/QF9rjHVg

    #2401186
    David
    Staff
    Customer Support

    Regarding the Cache – device type caching is up to you, its generally not required unless your site is generating device specific code. eg. you see different content on mobile then you do on desktop.

    Back to the topic.

    Can you check with WordPress Download Manager that we have the correct post type template slug ?

    #2401256
    Oppo Gene

    Hi David, it’s so confusing, how about if I share an Admin access to you so that you can check it from your side easily and make the actual Php that is required so that this issue can be resolved

    Looking Forward

    #2401433
    David
    Staff
    Customer Support

    We don’t edit users sites. Its against our policies as we are not covered in the event that any issues arise.

    I found this doc:

    https://www.wpdownloadmanager.com/doc/template-files/

    It states the CPT post type slug is: wpdmpro

    So remove any PHP Snippets you added.
    Add this:

    
    add_filter( 'generate_entry_meta_post_types', function( $types ) {
        $types[] = 'wpdmpro';
    
        return $types;
    } );
    
    add_filter( 'generate_header_entry_meta_items', function($item) {
        if (is_single()) {
            return array(
                'date',
                'categories',
                'tags'
            );
        }
        return $item;
    });

    Once done clear any caches.
    If that don’t work then you will to contact the plugin author and ask them for some input.

    #2401832
    Oppo Gene

    Thanks David it is done, but a little issue is, the WordPress posts tags with the icon and theme font, but wpdmpro post are showing just simple text “X5” with link, can you please guide further how to make it as theme default icon. The placement of “wpdmpro tag” is perfect just need to make it as theme tag icon

    (Screenshots)
    https://postimg.cc/QBrcGnKL
    https://postimg.cc/LYQqXy58

Viewing 15 posts - 1 through 15 (of 32 total)
  • You must be logged in to reply to this topic.