Very new to this, need help
-
Hi,
I have limited knowledge of html, css, and WordPress. I do not have any other coding knowledge. I’ve attempted to go through your Documentations tab, but unfortunately I don’t understand any of it.
I would like to use your plugin to create a Search Page on the front-end of my site. This would display links (bulleted list, checkboxes or dropdown menus) of my categories (healthcare settings) and tags (topics related to the healthcare settings). By clicking on one of these links, you should get a full list of files that have been marked with that “tag” or “category.”
I have gone through my Media Library and added “category” and “tags” to the desired files. (Please note, I did not tag everything as I don’t want images to display, only PDFs, word docx, excel docs). I was able to create an att. category cloud, when you hover over one of these links, it will say the amount of files in that category, so I know it sort of works.
When I select a link, the gallery doesn’t appear. I would prefer a list of icons (PDF icon, Word icon, etc.) to be displayed (title of document, category, and tags assigned). Once clicked on, you should be able to open the file directly, not the attachment page.
Questions
– Is it possible to click on a category and get a sub-list of tags?
– When I click on one of my categories, nothing displays. What am I doing wrong?[mla_tag_cloud taxonomy=attachment_category number=0 mla_link_href="{+page_url+}?term_slug={+slug+}"][mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" mla_nolink_text="Click a term to display the gallery." mla_output="list"]I’m happy to provide more information. Thank you in advance for your help.
-
Thanks for your questions and for the details on your application goals. I know that the documentation is more reference than tutorial and can be dense for someone new to WordPress. I appreciate the efforts you’ve made and your progress.
Your
[mla_tag_cloud]shortcode looks fine and is working for you. The[mla_gallery]shortcode needs just a bit of work. Here are some suggestions:mla_output=listis not one of the supported output formats. For your application the default value,gallerywill do what you want. You should just remove themla_outputparameter.- You wrote “I did not tag everything as I don’t want images to display, only PDFs, word docx, excel docs” The default display for
[mla_gallery], as for the WordPress[gallery]shortcode on which it is based, includes only image MIME types. To display other types like the examples you gave you must add one or more MIME types. Since you are filtering your display by an Att. Category term you can simply addpost_mime_type=allto your shortcode. If you wanted, say, PDF documents only you would code something likepost_mime_type=application/pdf. - You wrote “I would prefer a list of icons…” The default for non-image types is to display the item Title. You can display an appropriate icon by adding
size=iconto your shortcode. - You want to display “title of document, category, and tags assigned” The easy way to do this would be to add an
mla_captionparameter to the shortcode. More elaborate formatting can be done with a custom markup template. Start with something like:mla_caption="{+title+}<br />Category: {+terms:attachment_category(name)+}<br />Tag(s): {+terms:attachment_tag(name)+}" - You might also add
columns=2to give more room for each item displayed.
Putting all that together gives you:
[mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" post_mime_type=application/pdf size=icon mla_caption="{+title+}<br />Category: {+terms:attachment_category(name)+}<br />Tag(s): {+terms:attachment_tag(name)+}" columns=2 mla_nolink_text="<br />Click a term to display the gallery.<br />"]As I said, custom markup and style templates would give you even more control over the results, but the above is a good place to start. I hope that answers your second question.
Your first question, “Is it possible to click on a category and get a sub-list of tags?“, is more complicated than it looks. Each WordPress taxonomy is independent from the others, e.g., there is no built-in relationship between categories and tags. A more precise, technical expression of your question would be “Is it possible to click on a category and get a sub list of tags assigned to the items that have been assigned to that category?” That’s a mouthful, but the steps required to get the answer you want are:
- find all of the documents assigned to a given category,
- find all of the tags assigned to those documents,
- remove the duplicates and display the resulting list of tags.
It is not too difficult to do that using the hooks built in to
[mla_tag_cloud]or the new[mla_term_list], but it requires some PHP code in a small custom plugin or added to your theme’sfunctions.phpfile. If that is worth the effort for your application let me know and I can be more specific.I hope the above suggestions are helpful. I will leave this topic unresolved until I hear back from you. Thanks for your interest in the plugin.
Thank you for all of your help. I will try this and let you know how it turns out. π
Hi,
Thank you for this help. I was able to add your edited code. It works BUT it’s not quite what I was hoping for.
I want to see a thumbnail of the file. (Icon was the wrong term to use, my apologies.) Next to the thumbnail (either to the side or below thumbnail), I would like to see the file name (and possibly the description of the file) automatically, not on rollover or mouse hover. Is this possible?
Questions
- How do I get the document thumbnails to appear with file name and description to appear next to or below?
- I would like to offer the option to search key words in the search form or select the category. But this isn’t working for me currently.
Here is my code:
(I am using Shortcodes Ultimate plugin to add columns. The term list is in the left column and the gallery/results will be in the right column.)[su_row][su_column size="1/3"] <h2 style="margin-top:0px;">Search by Category</h2> <form id="mla-search-form" action="." method="post"> <input id="mla-search-box" name="search-string" type="text" value="" /> <input id="submit" name="submit" type="submit" value="Search" /></form> [mla_term_list taxonomy=attachment_category number=0 mla_output=ulist mla_link_href="{+page_url+}?term_slug={+slug+}"][/su_column] [su_column size="2/3"] [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" post_mime_type=all columns=1 mla_caption="{+title+} : {+description+}" mla_nolink_text="<br />Click a term to display resources.<br />"] [/su_column] [/su_row]Thank you in advance for your continued support. This plugin is great, I only wish I had more advanced knowledge to better understand the Documentation tab.
Thanks for your update with the progress report and the additional information. I’m happy to see you’ve found the new
[mla_term_list]shortcode.You asked “How do I get the document thumbnails to appear?” If your server/host configuration includes both Ghostscript and Imagick/ImageMagick support you can use the
mla_viewer=trueparameter to generate and display PDF thumbnails, usually the first page of the document. You can find more information in the “Thumbnail Substitution Support, mla_viewer” section of the Settings/Media Library Assistant Documentation tab. On the Shortcodes tab you will find the options for this feature. If you see a warning message under the enable checkbox your server may not have the required support for this feature. Let me know if this works for you.You wrote “ I would like to see the file name (and possibly the description of the file) automatically, not on rollover or mouse hover.” The normal display of an
[mla_gallery]shortcode puts the Caption value under each icon/thumbnail image. There are several other plugins that intercept the gallery output and reformat things, resulting in the symptoms you reported. Are you using another lightbox, slideshow or gallery plugin on your site?I will respond separately to the second question regarding keywords or categories. You wrote “I would like to offer the option to search key words in the search form or select the category.” The keyword search parameter by default looks at the Title and Description fields for each item. MLA can extend this to other fields and to taxonomy terms. Which field(s) and/or taxonomies do you want to match against the keywords?
Hi – thank you for the continued support. This is incredibly helpful for me.
- I was able to add the necessary software to the server to get the thumbnails to appear. That is a success. Thank you.
- I have JetPack (https://wordpress.org/plugins/jetpack/) and Shortcodes Ultimate (https://wordpress.org/plugins/shortcodes-ultimate/). Would these help? I’m open to adding additional plugins, if need be.
- I would like to offer two options of search: search form and the term list. Here is my code again:
[su_row][su_column size="1/3"] <h2 style="margin-top:0px;">Search by Keyword</h2> <form id="mla-search-form" action="." method="post"> <input id="mla-search-box" name="search-string" type="text" value="" /> <input id="submit" name="submit" type="submit" value="Search" /></form> <h2 style="margin-top:30px;">Search by Category</h2>[mla_term_list taxonomy=attachment_category number=0 mla_output=ulist mla_link_href="{+page_url+}?term_slug={+slug+}"][/su_column] [su_column size="2/3"] [mla_gallery attachment_category="{+template:({+request:term_slug+}|a-bad-term)+}" post_mime_type=all columns=2 link=file mla_caption="{+title+} : {+description+}" mla_nolink_text="<br />Click a term to display resources.<br />" mla_viewer=true orderby="title"] [/su_column][/su_row]Your help is always appreciated. π Thank you in advance.
Thanks for your update with the kind words and the good news about
mla_viewerand your progress.I believe that Jetpack might be why the item Caption values only show up on rollover or mouse hover. I am trying to set up Jetpack on a test site but my hosting company is blocking it. Are you still having the Caption problem?
I am working on a solution for your “two options of search” desire. I am adapting the solution in this earlier support topic:
As you will see there, the “Category” part of the form is a checkbox list (
mla_output=checklist), because themla_output=ulistformat generates direct links that don’t submit the form when they are clicked. I am using a small custom plugin,mla-custom-taxonomy-example.php.txtto combine the two searches, make the selections “sticky” when the page reloads and to provide a paginated gallery controlled by the user.Your application requires some updates to the example plugin and to MLA itself; I will share these as soon as they are ready.
In the interim, I still need an answer to my earlier question: “Which field(s) and/or taxonomies do you want to match against the keywords?” Your first post implies that you want the search box to operate on the
attachment_tagterms; is that right?The example I am working on uses a checklist for
attachment_categoryterms and a search box forattachment_tagterms. You can enter one or the other. If you use both the checklist and the search box you will get items that are assigned to theattachment_categoryterms AND theattachment_tagterms, i.e. both filters must succeed. Is that what you want?Thanks for your answers to the above questions.
Based on your comments so far I have uploaded a new MLA Development Version dated 20160624 with a new /examples/mla-ui-elements-example.php.txt example plugin. The new example plugin has shortcodes that generate “Terms Search” and “Keyword Search” textboxes that retain the entered value when the page is refreshed. I have also added a shortcode for generating a “items per page” textbox.
If you install the new Development Version and the new example plugin your page could look like this:
[su_row][su_column size="1/3"] <form id="mla-search-form" action="." method="post"> <h2 style="margin-top:0px;">Search by Keyword</h2> [muie_keyword_search mla_search_connector='OR'] <h2 style="margin-top:0px;">Tags Search</h2> [muie_terms_search mla_terms_taxonomies=attachment_tag mla_term_delimiter=' ' mla_term_connector='OR'] <h2 style="margin-top:30px;">Search by Category</h2> [mla_term_list taxonomy=attachment_category number=0 mla_output=checklist mla_option_value="{+slug+}" use_filters=true] Items per page: [muie_per_page numberposts=10] <input id="submit" name="submit" type="submit" value="Search" /></form>[/su_column] [su_column size="2/3"] [mla_gallery attachment_category="{+template:({+request:tax_input.attachment_category+}|muie-no-terms)+}" post_mime_type=application/pdf add_filters_to=attachment_category mla_output="paginate_links,prev_next"] [mla_gallery attachment_category="{+template:({+request:tax_input.attachment_category+}|muie-no-terms)+}" add_filters_to=attachment_category post_mime_type=application/pdf columns=2 link=file mla_caption="{+title+} : {+description+}" mla_nolink_text="<br />Click a term to display resources.<br />" mla_viewer=true orderby="title" ][/su_column][/su_row]To get the Development Version, follow the instructions in this earlier topic:
Shortcode not working in (special) widget
You can follow the instructions in the “MLA Gallery Filters and Actions (Hooks)” section of the /Settings/Media Library Assistant Documentation tab to access and install the example plugin.
I look forward to working with you to refine the solution and completing your application design. Thanks for your help with this great example of how to use the new
[mla_term_list]shortcode.Hi, Sorry for the radio silence. I had to step back from this to work on other projects.
Here are some thoughts to your questions:
- Which field(s) and/or taxonomies do you want to match against the keywords?
- The example I am working on uses a checklist for attachment_category terms and a search box for attachment_tag terms. You can enter one or the other. If you use both the checklist and the search box you will get items that are assigned to the attachment_category terms AND the attachment_tag terms, i.e. both filters must succeed. Is that what you want?
I don’t know if I understand this question. I want att. categories as a checkbox list. I would like to also have an option to search with a keyword (typed in by user) that searches att. categories and att. tags. Let me know if this answers your questions or if you need more info.
Yes, that will work for me.
I’ve added the MLA Development Version , the MLA Gallery Filters and Actions (Hooks) and the included code you sent along previously. I am getting the new code spit back at me in the page, not actually run. I don’t know if I may have missed something or messed it up.
Thanks for your continued help.
Thanks for your updates and the additional information.
I regret that my earlier instructions may have confused you. It looks like you may have installed the wrong example shortcode ( MLA Gallery Filters and Actions (Hooks) ).
You can follow the steps in the MLA Gallery Filters and Actions (Hooks) section but you must access a different example plugin file. Look for the
mla-ui-elements-example.php.txtfile.When you have installed the right file you should see “MLA UI Elements Example” in your plugins list. That is the one you must activate to handle the
[muie_ ... ]shortcodes. Again, I regret any confusion.If you want the “Tags Search” to look in both “att. categories and att. tags“, change your shortcode to:
[muie_terms_search mla_terms_taxonomies="attachment_tag,attachment_category mla_term_delimiter=' ' mla_term_connector='OR']Give the above suggestions a try and let me know how they work for you.
I reread the example plugin download instructions and I realize that they are not easy to follow for files other than the one specifically referenced.
If you give me your contact information I can send the example plugin by email. You can use the Contact Us page at our web site:
Do not post your e-mail address in the forum; personal details in a public forum violates WordPress guidelines. I look forward to hearing from you.
Thanks for working with me offline to work through the taxonomy term searching aspects of your application. Thanks as well for putting up with the shortcomings of finding and installing the example plugin.
I have uploaded an MLA Development Version dated 20160802 that contains a completely new approach to browsing and installing the MLA Example Plugins. If you navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button you will see a new submenu that lists all the example plugins and give you a “one-click” action for installing them. I hope this will make future installations of the example plugins more convenient for all MLA users. Thanks for helping to inspire this MLA enhancement.
Thanks for your email message with the final details on your solution. For other Support Forum users, here is a summary:
Thank you so much, you have been extremely helpful. I think I am ready to go. This is working for me in IE, Firefox and Chrome. Here is the code:
[su_row][su_column size="1/4"]<form id="mla-search-form" action="." method="post"><h2 style="margin-top:0px;">Search by Category</h2> [mla_term_list taxonomy=attachment_category number=0 mla_output=checklist mla_option_value="{+slug+}" use_filters=true]<input id="submit" name="submit" type="submit" value="Search" />[/su_column][su_column size="3/4"]<span id=mla-tag-cloud><h2 style="margin-top:0px; margin-bottom:0px;">Search by Tags</h2> [su_expand more_text="Show all tags" less_text="Show less tags" height="200" hide_less="no" text_color="#333333" link_color="#0088FF" link_style="default" link_align="left" more_icon="icon: arrow-down" less_icon="icon: arrow-up"][mla_tag_cloud mla_output=grid smallest=11 largest=11 columns=4 number=0 taxonomy=attachment_tag mla_link_href="{+page_url+}?term_slug={+slug+}" use_filters=true][/su_expand][/su_column][/su_row] [su_row][su_column size="1/1"][mla_gallery attachment_category="{+template:({+request:term_slug+}|muie-no-terms)+}" add_filters_to=attachment_category post_mime_type="application/pdf" columns=3 mla_link_href="{+template:{+custom:TrueWebsite+}|{+link_url+}+}" mla_target="_blank" mla_nolink_text="<br />Click a term to display resources.<br />" mla_viewer=true orderby="title" mla_nolink_text="Click a term to display the gallery." mla_caption="{+title+}" add_filters_to=any] [mla_gallery attachment_tag="{+template:({+request:term_slug+}|muie-no-terms)+}" add_filters_to=attachment_tag post_mime_type="application/pdf" columns=3 mla_link_href="{+template:{+custom:TrueWebsite+}|{+link_url+}+}" mla_target="_blank" mla_nolink_text="<br />Click a term to display resources.<br />" mla_viewer=true orderby="title" mla_nolink_text="Click a term to display the gallery." mla_caption="{+title+}" add_filters_to=any][/su_column][/su_row] </span></form>I am marking this topic resolved, but please update it or email me if you have any problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.
The topic ‘Very new to this, need help’ is closed to new replies.