Phil Johnston on "[Plugin: Easy Digital Downloads] Download Tags/Category Filter"

ساخت وبلاگ

brandonchance
Member
Posted 5 hours ago #

What is the download equivalent of get_the_tags? I tried pulling the tags into my archive-download.php, but nothing shows up or the page just sticks on the pre-loader.

What I tried:

  • get_tags
  • get_the_tags
  • get_download_tags
  • get_the_download_tags

My tags code in case you need it:

<?php $tags = get_the_tags(); $posttags = '<div class="post_tags"><i class="fa fa-folder-o"></i>'; foreach ( $tags as $tag ) { $tag_link = get_tag_link( $tag->term_id ); $posttags .= "<a href='{$tag_link}' title='{$tag->name}' class='{$tag->slug}'>"; $posttags .= "{$tag->name}</a>"; } $posttags .= '</div>'; echo $posttags;
?>

https://wordpress.org/plugins/easy-digital-downloads/

Hey there,

If you want to show your tags, have you considered using the tag url at http://yoursite.com/downloads/tags?

You can get those links in your WP dashboard under "Dashboard" > "Downloads" > "Tags" > "View".

To answer your initial question, you'll want to look at:

https://codex.wordpress.org/Function_Reference/wp_get_post_terms

Tags are for WordPress "Posts". Easy Digital Downloads doesn't use "tag" but rather "download-tag".

Both tags and categories are known as "terms" in WordPress. To lea more about taxonomies and taxonomy-terms in WordPress take a look here:
https://codex.wordpress.org/Taxonomies

brandonchance
Member
Posted 3 hours ago #

You can get those links in your WP dashboard under "Dashboard" > "Downloads" > "Tags" > "View".

I don't see "Downloads" while in my dashboard; I do see "1 Download" but following that link doesn't get me to the next 2. I tried the same with "EDD Products" but couldn't find the 2 links that should follow.

And I'm still trying to see if I can get everything working with the info in your second response! I've made a little progress with it!

If you don't see "Downloads" in the sidebar in your WordPress dashboard (yoursite.com/wp-admin), double check that you have the Easy Digital Downloads plugin active under "Dashboard" > "Plugins".

brandonchance
Member
Posted 1 hour ago #

Yeah, it's active! But I have "EDD Products" instead of "Downloads".

Under "EDD Products" there's an "All Downloads" link, but that still doesn't get me to "Tags"

Ah! Have you modified it to say EDD Products yourself?

There should be a sub-menu item called tags. If there isn't, you'll have to re-install the Easy Digital Downloads plugin fresh to rule out something having been changed with the code to hide the tags sub-menu.

brandonchance
Member
Posted 1 hour ago #

No I haven't modified it, but I'll try reinstalling it

brandonchance
Member
Posted 1 hour ago #

Sorry but I should have stated earlier, I do have two extensions though! Maybe one of them are modifying it?

• Free Downloads
• Mailchimp

Also try disabling all other plugins to rule out that being hidden by one of them. Try also switching to the "Twenty Sixteen" theme to rule out any other potential causes.

brandonchance
Member
Posted 41 minutes ago #

Tried the suggestions above, but it's still the same. I used my Dev Tools and it has "menu-posts-download" as the id, and it links to "edit.php?post_type=download" so I believe it's correct! Not sure why the name is wrong, and why I can't get to tags though :/

Definitely strange. I can't say I have ever seen that before. Can you send a link to a screenshot of what you are looking at?

brandonchance
Member
Posted 23 minutes ago #

imgur Picture Link

In the second picture, I had to hide some of the sidebar items to get both "EDD Products" and it's contents in view, but none of those items were relevant to Easy Digital Downloads

In the second screenshot, the 4th link down is called "tags". Do you see that one?

brandonchance
Member
Posted 19 minutes ago #

Yes, but there's no "View" inside of it. I'll attach a pic for that

Ah - you need to hover your mouse over one of your tags to see the "View" link.

brandonchance
Member
Posted 16 minutes ago #

K, I did that and I got a "404 - Page Not Found" Error

In that case it looks like you need to reset your permalinks. Try going to "Dashboard" > "Settings" > "Permalinks" > "Save".

brandonchance
Member
Posted 11 minutes ago #

Yeah that worked, but just curious, if I go that route would I have to manually plug in my tags for every post?

Could you clarify what you mean by "plug in"?

brandonchance
Member
Posted 7 minutes ago #

Yeah, sorry for the slang! "Type in" would have been better

edit (clarification): Verses doing so dynamically

Sorry I am still having trouble what you mean. Where and what would you be typing in exactly?

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 347 تاريخ : يکشنبه 10 مرداد 1395 ساعت: 7:34