MOON
Server: Apache
System: Linux server1.primemusicproductions.com 4.18.0-477.27.2.el8_8.x86_64 #1 SMP Fri Sep 29 08:21:01 EDT 2023 x86_64
User: primrwxj (1001)
PHP: 8.3.3
Disabled: NONE
Upload Files
File: /home/primrwxj/2-createawebsite.com/wp-content/themes/magazine-pro/page_affiliate_landing.php
<?php
/**
 * Affiliate Landing template for Magazine Pro.
 *
 * Template Name: Affiliate Landing
 *
 * Purpose: a focused, conversion-first page for one affiliate offer.
 * - Full-width layout
 * - Keeps site header/footer for trust
 * - Disables AdSense injections (handled by monetization.php)
 * - Adds dedicated affiliate widget slots + disclosure
 */

// Add custom body class.
add_filter( 'body_class', function( $classes ) {
	$classes[] = 'affiliate-landing';
	return $classes;
} );

// Force full width.
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' );

// Remove breadcrumbs for cleaner focus.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );

// Optional: remove the secondary nav if it exists (reduces distraction).
remove_action( 'genesis_after_header', 'genesis_do_subnav' );

// Add disclosure + top CTA slot just below the title.
add_action( 'genesis_entry_header', 'magazine_affiliate_landing_header_blocks', 15 );
function magazine_affiliate_landing_header_blocks() {
	echo do_shortcode( '[affiliate_disclosure]' );
	if ( function_exists( 'magazine_render_monetization_area' ) ) {
		magazine_render_monetization_area( 'affiliate_top', 'Affiliate slot: Top Banner' );
	}
}

// Add mid + final CTA slots after content.
add_action( 'genesis_after_entry_content', 'magazine_affiliate_landing_footer_blocks', 9 );
function magazine_affiliate_landing_footer_blocks() {
	if ( function_exists( 'magazine_render_monetization_area' ) ) {
		magazine_render_monetization_area( 'affiliate_mid', 'Affiliate slot: Mid-Content CTA' );
		magazine_render_monetization_area( 'affiliate_footer', 'Affiliate slot: Final CTA' );
	}
}

// Run Genesis.
genesis();