Thread Starter
guyk5
(@guyk5)
it may be useful to someone
<?php
if( is_page(” ) ){
$_a_z_listing_colcount = 3;
$_a_z_listing_minpercol = 3;
}else{
$_a_z_listing_colcount =1;
$_a_z_listing_minpercol = 1;}
?>
I’m glad you got it sorted. Sorry I didn’t get here promptly to help you directly.
If you place the shortcode on posts of the “page” type, then you can create multiple a-z-listing.php
templates in your theme following the pattern of a-z-listing-<section>.php
where <section>
is the top-most page in the hierarchy’s slug. For example, if you have pages like below:
Then, if you place the A-Z shortcode on About
or Child of about
, the template mechanism will use whichever is found first from: a-z-listing-about.php
and a-z-listing.php
when searched in that order.
Likewise if you put the A-Z shortcode on Shop
or a child of Shop, the template mechanism will search in order: a-z-listing-shop.php
followed by a-z-listing.php
.
In all cases, if no template is found in your theme folder the plugin will use the default template at wp-content/plugins/a-z-listing/templates/a-z-listing.php
.