Code does not work for Pro theme

Hello. Awhile back I asked about how to add text and links above the main Blog page and I was able to do it with X Theme with your help. However recently I’ve updated to Pro Theme and it seems the code no longer works and the text and links no longer display above the blog posts. This is the code I have in my functions.php page. What do I need to edit for the code to work in Pro Theme? Thanks. https://www.thosecrazyvegans.net

<?php

// =============================================================================
// FUNCTIONS.PHP
// -----------------------------------------------------------------------------
// Overwrite or add your own custom functions to X in this file.
// =============================================================================

// =============================================================================
// TABLE OF CONTENTS
// -----------------------------------------------------------------------------
//   01. Enqueue Parent Stylesheet
//   02. Additional Functions
// =============================================================================

// Enqueue Parent Stylesheet
// =============================================================================

add_filter( 'x_enqueue_parent_stylesheet', '__return_true' );



// Additional Functions
// =============================================================================

add_action( 'x_before_view_global__index', 'print_custom_header_for_blog' );
function print_custom_header_for_blog(){
if( is_home() ){
?>
<div id="blog_section" class="x-section" style="margin: 0px;padding: 45px 0px; background-color: transparent;">
<div class="x-container max width" style="margin: 0px auto;padding: 0px;">
<div class="x-column x-sm x-1-1" style="padding: 0px;">
<p style="font-size:20px;">Welcome to Those Crazy Vegans Blog! Read up on all kinds of crazy and controversial issues, add your thoughts and comments, or <a href="https://www.thosecrazyvegans.net/register">register</a> and <a href="https://www.thosecrazyvegans.net/submit-a-blog-article/">share</a> your own blogs. Thanks for helping spread the message of peace and compassion for the earth and the animals!</p></div>
</div>
</div>
<?php
}
}

add_filter( 'bbp_get_forum_archive_title', 'tcv_forum');

function tcv_forum () {
	Return 'Forum' ;
}

Hi There,

I could see that you’ve switched back to the Pro parent theme.

Could you please activate the Pro child theme so we can take a closer look?

Thank you.

Thanks for letter me know. I didn’t realize that and now my whole header and menu is gone. what?!!!

Update. It seems like I fixed most of the errors and switched the theme to Pro Child. But of course, the original issue still persists.

Hey @michaellanfield,

I don’t see the function added in your child theme (see Secure Note). And, the content of your functions.php is different than the one you posted. I tested the function in my dummy site and it works in Pro. Please add the function to your child theme. I tried replacing the code in your functions.php with the code you posted here via the WordPress editor but it won’t allow me to. I was suppose to use your FTP credentials but what you gave previously does not work anymore.

Thanks.

I can’t see what is in your secure note.

Hi there,

I tried to login using the details you have provided but it does not seem to be working as I am getting the error (secure note).

In case you have an IP restriction active for the FTP logins, kindly temporarily disable it.

Thank you.

For some reason I was unable to login and so I set Filezilla to “Only Use Plain FTP”. I should contact Bluehost

Hi again,

Do let us know when this gets sorted.

Thanks!

Bluehost says they have an issue and they are working to get it fixed. But you can login with plain FTP using port 21

Hi there,

The code wasn’t added, I went ahead and added it and it works https://www.thosecrazyvegans.net/blog/

Cheers!

1 Like

Thank you Rad. Terrific!

You’re welcome.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.