Problem with Headers



On my website I have a problem with the template file I think. I am using a custom theme and so far I managed to fix the markup so rtMedia shows my website as it’s supposed to look but it keeps on loading the Website title and site description above the template. I have no idea how to remove this. Example can be found @ - Hope to be able to fix this soon :)!


Have you overridden the rtMedia Templates to fix the markup? Try deactivating all the other plugins too and check once.


I have tried that. The problem seems to be that the template file is calling the website title and description in the header. I can however remove that but if I do so then the buddypress headers are not being called for anymore and the template is incomplete, since the avatar and user information will not show up. I am confused :o Sorry for my bad english btw.


 * Main.php  
 * The main template file, that loads the header, footer and sidebar  
 * apart from loading the appropriate rtMedia template  
// by default it is not an ajax request  
global $rt_ajax_request;  
$rt_ajax_request = false;  

// check if it is an ajax request  
if (  
		! empty( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) &&  
		strtolower( $_SERVER[ 'HTTP_X_REQUESTED_WITH' ] ) == 'xmlhttprequest'  
	$rt_ajax_request = true;  

//if it's not an ajax request, load headers  
if ( ! $rt_ajax_request ) {  

	// if this is a BuddyPress page, set template type to  
	// buddypress to load appropriate headers  
	if ( class_exists( 'BuddyPress' ) && ! bp_is_blog_page() ) {  
		$template_type = 'buddypress';  
	} else {  
		$template_type = '';  

	get_header( $template_type ); }  

	// the markup for the template starts  

That is the only part of the old template code from rtMedia I have left in because without that the template won’t work. (And the PHP where the gallery etc is called is still in the template file but on the right spot.)


You might want to look at the get_header() part of the main.php. Check and see if everything works fine on the default BuddyPress theme. Maybe your theme must be looking for a different header file.


I managed to fix this issue. The problem was indeed, the template file calling for the wrong header. I have removed the get_header() part from the code, and now it is not showing the website title and meta information above my template anymore. Is there any way I can change the topic title to Solved?


Glad to know that you could get your issue resolved. I’ll mark this issue as “Solved”. Only forum moderators can mark topics as “Solved” :slight_smile: