Tagged: x
-
AuthorPosts
-
July 31, 2016 at 1:04 pm #1111094
Praxis ResearchParticipantHey,
I wanted the author shortcode active on author pages, so I added this code to my child theme as author.php a long time ago:
<?php // ============================================================================= // VIEWS/RENEW/WP-INDEX.PHP // ----------------------------------------------------------------------------- // Index page output for Renew. // ============================================================================= ?> <?php get_header(); ?> <div class="x-container max width offset cf authorpage"> <div class="<?php x_main_content_class(); ?>" role="main"> <div class="author"><?php echo do_shortcode( '[author]' ); ?></div> <?php x_get_view( 'global', '_index' ); ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>It worked before, but I recently found the page doesn’t load at all anymore. I renamed the custom PHP file to deactivate it, and the normal author page loaded, so there must be a problem with the custom code. Could you help me fix it?
July 31, 2016 at 6:56 pm #1111268
RadModeratorHi there,
Try replacing this line,
<div class="author"><?php echo do_shortcode( '[author]' ); ?></div>with this new line,
<div class="author"><?php echo do_shortcode( '[x_author]' ); ?></div>Hope this helps.
August 1, 2016 at 4:32 am #1111755
Praxis ResearchParticipantBlank page still. It’s worth mentioning that, even if I remove the shortcode bit, the page still doesn’t load. I don’t think the problem is with the shortcode bit. Even simply copying VIEWS/RENEW/WP-INDEX.PHP to the child theme as ‘author.php’ breaks the author pages. Maybe it would help if I knew where the PHP file is that’s actually being used to build the default author pages?
August 1, 2016 at 4:54 am #1111777
LelyModeratorHi There,
Your code is correct. Above code is working when I doubled check. I did save the code as author.php and then save it on x-child folder.
If what you’re having us white blank page, a white screen usually means there is a fatal PHP error. Can you please enable WP_DEBUG mode? You can do this by opening
wp-config.phpand adding
define( 'WP_DEBUG' , true );just above/* That's all, stop editing! Happy blogging. */For example:define('WP_DEBUG', true); /* That's all, stop editing! Happy blogging. */When you revisit the page with the white screen, you should have some error output describing the issue in more detail.
If not, would you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
August 1, 2016 at 11:46 am #1112280
Praxis ResearchParticipantThis is what the debug shows:
Notice: Undefined variable: file in /home/praxisre/public_html/wp-content/plugins/fix-my-feed-rss-repair/rss-feed-fixr.php on line 14 Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in /home/praxisre/public_html/wp-includes/functions.php on line 3897 Notice: bp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). === Trace: #6 /home/praxisre/public_html/wp-content/plugins/bp-you-are-blocked/buddypress-block.php(39): is_user_logged_in() #7 [internal function]: bpb_load_plugin('') #8 /home/praxisre/public_html/wp-includes/plugin.php(525): call_user_func_array('bpb_load_plugin', Array) #9 /home/praxisre/public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(35): do_action('bp_include') #10 [internal function]: bp_include('') #11 /home/praxisre/public_html/wp-includes/plugin.php(525): call_user_func_array('bp_include', Array) #12 /home/praxisre/public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(305): do_action('bp_loaded') #13 [internal function]: bp_loaded('') #14 /home/praxisre/public_html/wp-includes/plugin.php(525): call_user_func_array('bp_loaded', Array) #15 /home/praxisre/public_html/wp-settings.php(277): do_action('plugins_loaded') #16 /home/praxisr in /home/praxisre/public_html/wp-includes/functions.php on line 3897 Notice: Constant BP_AVATAR_FULL_WIDTH already defined in /home/praxisre/public_html/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 28 Notice: Constant BP_AVATAR_FULL_HEIGHT already defined in /home/praxisre/public_html/wp-content/themes/x/framework/functions/global/plugins/buddypress.php on line 29 Notice: The called constructor method for WP_Widget in GTags_Widget is deprecated since version 4.3.0! Use __construct() instead. in /home/praxisre/public_html/wp-includes/functions.php on line 3718 Notice: The called constructor method for WP_Widget in GTags_Activity_Widget is deprecated since version 4.3.0! Use __construct() instead. in /home/praxisre/public_html/wp-includes/functions.php on line 3718August 1, 2016 at 12:12 pm #1112319
RupokMemberHi there,
It looks like your issue is related with a plugin (fix-my-feed-rss-repair). Let’s deactivate this and check again. You can remove the plugin folder from /wp-content/plugins/
Thanks!
August 1, 2016 at 12:25 pm #1112335
Praxis ResearchParticipantThis reply has been marked as private.August 1, 2016 at 12:41 pm #1112359
RupokMemberHi there,
The author page seems blank and there is no error. Did you disable the debug mode or removed the plugin?
Let us know.
August 1, 2016 at 1:12 pm #1112409
Praxis ResearchParticipantI disabled debug mode. Since the site is live, I don’t want to leave debug mode on for any long period of time. I had deleted the plugin folder, but, when the problem persisted even with the plugin gone, I restored it.
August 1, 2016 at 7:48 pm #1112960
FriechModeratorHi There,
Would you mind providing us an FTP credentials with an access to the WP installation files? So we can take a closer look. Seems the one you provided above has only limited access.
Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.
Thanks.
August 1, 2016 at 8:49 pm #1113077
Praxis ResearchParticipantThis reply has been marked as private.August 2, 2016 at 12:47 am #1113263
RupokMemberHi there,
That file doesn’t contain FTP password. Kindly provide correct FTP credentials :
– FTP host name
– FTP username
– FTP passwordYou can ask your hosting provider for help.
Thanks!
August 2, 2016 at 10:18 am #1113879
Praxis ResearchParticipant[Blah]
August 2, 2016 at 10:41 am #1113930
Praxis ResearchParticipantI disabled the custom author page php and added to functions.php this code I found here on the forums:
// Show Author Box on Author Page // ============================================================================= function add_author_meta() { if ( is_author() ) { $id = get_the_author_meta( 'ID' ); echo do_shortcode('[x_author id="'.$id.'"]'); } } add_action('x_before_view_global__index', 'add_author_meta');Works perfectly. Thanks for your help. ^_^
August 2, 2016 at 11:07 am #1113966
RupokMemberYou are welcome!
Glad that you sorted it out. Feel free to let us know if you face any other issue. We’ll be happy to assist you.
Thanks for using X.
Cheers!
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1111094 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
