• Resolved buddhaben

    (@buddhaben)


    Hi David.

    my taxonomy-attachment_tag.php worj without permalink but when aktive permalink not work.

    /attachment_tag/azure/ (404 Error: Page Not Found )

    ?attachment_tag=azure (ok working)

    <?php get_header(); // Loads the header.php template. ?>
    <div class=”subpage-title container-fluid”>
    <div class=”row-fluid”>
    <div class=”span4 hidden-phone”></div>
    <div class=”span4″><h1> <?php $term = get_term_by(‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
    echo $term->name; ?> ?</h1>This page provides some pointers on wearing <?php $term = get_term_by(‘slug’, get_query_var( ‘term’ ), get_query_var( ‘taxonomy’ ) );
    echo $term->name; ?>
    </div>
    </div>
    </div>
    <div class=”mla-tags-gallery”>
    <?php echo do_shortcode(‘[mla_gallery post_mime_type=application link=”file” size=icon category=”federal” taxonomy=”media-category” mla_caption=”{+title+} {+description+} {+date+}” s=”{+request:$tag+}” ]’ ); ?>

    <?php global $wp_query;
    $args = array_merge( $wp_query->query_vars, array( ‘post_type’ => ‘attachment’, ‘post_status’ => ‘inherit’ ) );
    query_posts( $args );
    ?>

    <div class=”container-fluid”>

    <div align=”center” id=”masonry”>

    <?php get_template_part( ‘loop-meta’ ); // Loads the loop-meta.php template. ?>

    <?php if ( have_posts() ) : ?>

    <?php echo do_shortcode( sprintf( ‘[mla_gallery %1$s=”%2$s” mla_caption=”{+title+}” columns=”5″ numberposts=”1000″ order=DESC]’, $wp_query->query_vars[‘taxonomy’], $wp_query->query_vars[‘term’] ) ); ?>

    <?php else : ?>

    <?php get_template_part( ‘loop-error’ ); // Loads the loop-error.php template. ?>

    <?php endif; ?>

    </div></div></div><!– .hfeed –>

    <?php // get_template_part( ‘loop-nav’ ); // Loads the loop-nav.php template. ?>

    <?php get_footer(); // Loads the footer.php template. ?>

    https://wordpress.org/plugins/media-library-assistant/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thank you for your question and for taking the time to post the PHP code of your taxonomy-attachment_tag.php file; that’s very helpful. It looks like you also found the earlier “Displaying Tags in Text Format” support topic and have adapted some of that code for your application; that’s great research.

    You have two [mla_gallery] shortcodes in your file, and I can give you a few comments on them that might get you a better result. The first shortcode is:

    [mla_gallery post_mime_type=application link="file" size=icon category="federal" taxonomy="media-category" mla_caption="{+title+} {+description+} {+date+}" s="{+request:$tag+}" ]

    Two of the parameters in this shortcode are not doing what you expect:

    1. taxonomy="media-category" is ignored. There is no taxonomy parameter defined for the shortode. If you are trying to find the items assigned to a particular term, you would code something like media-category="some-slug-value" where media-category is the taxonomy and some-slug-value is the slug for a specific term. Of course, you would also have to define media-category as a custom taxonomy of your own (MLA provides attachment_category and attachment_tag for your use).
    2. s="{+request:$tag+}" is not doing anything because the {+request:$tag+} part is returning an empty string and s="" will match anything. If you have defined “tag” as a query argument in your URL, you would use {+request:tag+} to populate the “s” parameter. That would search for whatever value “tag” has in the Title and Description fields of your items. If you are searching for a taxonomy term, you would code something like media-category="{+request:tag+}".

    Your second shortcode is:

    sprintf( '[mla_gallery %1$s="%2$s" mla_caption="{+title+}" columns="5" numberposts="1000" order=DESC]', $wp_query->query_vars['taxonomy'], $wp_query->query_vars['term'] ) );

    That shortcode looks fine to me, assuming you are looking for images assigned to the current term in the attachment_tag taxonomy (since your file name is taxonomy-attachment_tag.php). If you are not looking for images, try adding something like post_mime_type=application size=icon to find items such as PDF documents.

    I do not know why the /attachment_tag/azure/ Permalink does not work and the ?attachment_tag=azure variation does work. On my test system, both of these forms return the same result. You could try going to the Settings/Permalinks page and clicking “Save Changes” to update the .htaccess file. You could also try copying your taxonomy-attachment_tag.php file to taxonomy.php and see if that works. If not, your theme may be doing something with the URL rewrite rules.

    I will leave this topic unresolved for now. Let me know if any of the suggestions work for you.

    Thread Starter buddhaben

    (@buddhaben)

    thanks for answer but dont work still

    Plugin Author David Lingren

    (@dglingren)

    Thank you for your response; I an sorry to hear you are still having this issue.

    I am not sure I can be of more help, since I do not have access to your site and the theme you are using. Can you tell me what your “Permalinks” Settings are? Do you have anything in the Category base and Tag base fields? Are there any theme-specific permalinks settings?

    How do you generate the “/attachment_tag/azure/” and/or “?attachment_tag=azure” links? Are you sure the links you generate match the Permalinks setting for your site?

    As I said, this does not look like an MLA issue; it is some problem with your WordPress or Theme Permalinks structure. If you can answer the above questions I will give it some more thought.

    Thread Starter buddhaben

    (@buddhaben)

    again hi,
    thema : http://www.freewpthemes.in/ipin-free-wordpress-theme/

    my plugin list.
    Disqus Comment System
    Flexible Posts Widget
    Google XML Sitemap for Images
    Google XML Sitemaps
    Media Library Assistant
    Multi Rating
    NextScripts: Social Networks Auto-Poster
    Options Framework
    SEO Friendly Images
    Shareaholic
    StatPress
    WordPress SEO
    WP-Optimize
    WP-PostViews
    Yandex News

    My permalinks set: http://i.hizliresim.com/V2PMBR.png

    i hope u can help me.

    Thread Starter buddhaben

    (@buddhaben)

    and I changed the theme but still not work.

    Plugin Author David Lingren

    (@dglingren)

    Thank you for the additional information and the list of plugins on your site.

    I set up a test site, downloaded and activated all of the plugins in your list. Using the WordPress Twentytwelve theme, I cannot reproduce the issue you have reported. Both the /attachment_tag/azure/ and ?attachment_tag=azure forms of the URL are working without error on my test site.

    I do not know what else I can do to help you with this issue, which seems to be specific to your site. I do not see any way that MLA could be contributing to this issue, so I am marking this topic resolved. I regret that I was unable to help you.

    Thread Starter buddhaben

    (@buddhaben)

    thanks.
    I uninstall and after re-install all plugins now working.

    Plugin Author David Lingren

    (@dglingren)

    Thank you for posting your update and for the good news. Does this mean that you reinstalled Media Library Assistant as well? In other words, are you now using MLA and do not have the permalink problem?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘taxonomy-attachment_tag.php dont work with permalink’ is closed to new replies.