Category template please help
-
Hi,
I must ask this question, couse I just cant get it! Sorry. Im stucked, after hours of testing.The problem:
Custom template does not spit out anything.My permalink settings:
/%post_id%/%postname%/
My template file:
taxonomy-attachment_category.php
I created an att.category “Myself” and assign images. Working fine, shows up in tables, columns and so on. Also when:
$terms = get_the_terms($post->ID, 'attachment_category');
So far so good.
BUT
When clicking in the att.category table “View”, I gor this slug :
https://localhost/wp-new/attachment_category/myself/
The responding
taxonomy-attachment_category.php
opens, but then I cant get it… I tried (trying) :<?php get_header(); ?> <?php $cat= $_REQUEST['attachment_category']; echo $cat; // debugging... $cat = 'Myself'; // $cat cant be found so I force it ua_cat_nav( 'nav-above' ); echo do_shortcode("[mla_gallery columns=5 link='file' posts_per_archive_page=10 attachment_category='".$cat."']"); ua_cat_nav( 'nav-below' ); ?>
The
<?php if ( have_posts() ) : ?>
returns nothing.
The shortcode works and spit the images, but I need to get the $cat value…I tried to go through all supports, but cant find a simple whole template.php file example for front end view.
Where am I doing wrong?https://www.ads-software.com/extend/plugins/media-library-assistant/
- The topic ‘Category template please help’ is closed to new replies.