Hi all,
I wanted to share the solution I used for displaying the Package Description (from CPT Settings > Packages) inside the Pricing Block cards. By default, the Pricing block does not render this field.
I achieved this by overriding the package.php template. Here is the process for anyone else who needs it (specifically for the Bootstrap style).
1. Locate the Original File
The source file is located in the Pricing Manager plugin folder:
/wp-content/plugins/geodir_payment_manager/templates/bootstrap/loop/package.php
2. Create the Override in Your Child Theme
Copy that file to your child theme. Note that for GeoDirectory overrides, you must drop the specific add-on name and use the main geodirectory folder.
Destination Path:
/wp-content/themes/[your-child-theme]/geodirectory/bootstrap/loop/package.php
(Note: You will need to create the geodirectory, bootstrap, and loop folders if they don't exist.)
3. The Modified Code
Replace the content of your new package.php with the code below.
I added a Custom Description Section inside the card-header div, directly under the price. It checks if a description exists and then displays it using standard GD filters.
<?php
/**
* Pricing Single Package - Custom Override
* Adds Description field to the pricing card header.
*/
defined( 'ABSPATH' ) || exit;
global $aui_bs5;
?>
<div class="col <?php echo esc_attr( $card_class ); ?>">
<div class="card mb-lg-0 <?php echo esc_attr( $highlight_class . ' ' . $border_class . ' ' . $card_shadow_class ); ?>">
<div class="card-header <?php echo esc_attr( $card_header_border_class ); ?><?php echo ( $aui_bs5 ? ' bg-light' : '' ); ?>">
<h4 class="my-0 mb-1 text-base subtitle text-center py-3 text-nowrap text-<?php echo esc_attr( $color ); ?>"><?php echo wp_kses_post( $display_name ); ?></h4>
<p class="text-muted text-center mb-3"><span class="h2 text-dark"><?php echo wp_kses_post( $display_price ); ?></span><span class="<?php echo ( $aui_bs5 ? ' ms-2' : ' ml-2' ); ?>">/ <?php echo esc_html( $display_lifetime ); ?></span></p>
<?php if ( ! empty( $package->description ) ) : ?>
<div class="gd-package-description text-center mb-3 px-3 text-muted">
<?php echo apply_filters( 'geodir_package_description', $package->description, $package ); ?>
</div>
<?php endif; ?>
</div>
<div class="card-body">
<ul class="fa-ul my-2<?php echo ( $aui_bs5 ? ' ps-0 ms-3' : '' ); ?>">
<?php if ( ! empty( $package->features ) ) { ?>
<?php foreach( $package->features as $feature => $data ) { $icon_class = ( ! empty( $data['icon'] ) ? str_replace( array( 'fas fa-', 'far fa-', 'fab fa-' ), '', $data['icon'] ) : '' ); ?>
<li class="mb-3<?php echo ( $aui_bs5 ? ' ms-4' : '' ); ?><?php echo ( $icon_class ? ' ' . sanitize_html_class( 'geodir-fe-' . $icon_class ) : '' ); ?>" data-geodir-feature="<?php echo esc_attr( $feature ); ?>"><span class="fa-li text-<?php echo esc_attr( $data['color'] ); ?>"><i class="<?php echo esc_attr( $data['icon'] ); ?>"></i></span><?php echo $data['text']; ?></li>
<?php } ?>
<?php } ?>
</ul>
<div class="text-center"><a class="btn btn-<?php echo esc_attr( $color ); ?> <?php echo ( $aui_bs5 ? 'd-block' : 'btn-block' ); ?>" href="<?php echo esc_url( $package_link ); ?>"><?php _e( 'Select Plan', 'geodir_pricing' ); ?></a></div>
</div>
</div>
</div>
4. The Result
This modification places the package description centered in the header area, right between the price and the white body section containing the features list.
Hope this helps! And I hope that GeoDirectory implements this.