BuddyBoss Home – Web › Support Forums › Themes › Boss. theme › 404 page display
Tagged: 404
- This topic has 5 replies, 2 contibutors, and was last updated 9 years, 8 months ago by Anonymous.
-
Question
April 2, 2015 at 10:28 am #38420@jellyjumpmediaI have a job plugin installed (wp job manager) and find I get a 404 page returned when selecting the job to view.
Long story short I have found that this is happening only when I have the boss child theme active (which of course it should be as I have many custom settings). The plugin works completely fine if I have the Twenty Fourteen theme active and also if I have the (master) Boss theme active, but as soon as the child theme has been activated I get the 404 page error.
I have done all normal things such as permalinks, clearing of cache, uninstall re-install of the job plugin etc as well as checked all mod_rewrite settings in both my .htaccess file and even through my Apache server and it points to only return a 404 page when the Boss child theme is active.
Can anyone make a suggestion on what I can look at next to try and resolve this please?
Thanks
Answers
April 2, 2015 at 10:46 am #38421@
Anonymoushi @jellyjumpmedia i am not able to replicate you issue
i had installed the wp job manager plugin and able to add jobs and view them.Regards
Varun DubeyApril 2, 2015 at 10:50 am #38424@
Anonymous@jellyjumpmedia i had added different job manager plugin screenshot earlier, have tested wp job manager and job manager both
both worked normally
April 2, 2015 at 12:50 pm #38438@jellyjumpmediaThanks, it is a strange one that’s for sure. I have actually been troubleshooting this for the past week or so and been working with another plugin developer as originally I thought it was a fault with their job board plugin, so with that in mind I installed a different job plugin (wp job manager) but the same problem occurs, of course none of these plugins are yours and I wouldn’t expect you to troubleshoot them that’s why I have been troubleshooting it the past week without reaching out to you guys.
It’s only now I notice that I have this problem with the activation of the Boss child theme only (as I say, it’s strange).
I’ll try to explain a little more. Two screenshots attached.
– 1st shows the job page URL with job listings (I have one displayed as a test job although I have tested with many dummy jobs). This page displays and looks fine. I then select the job posting
– 2nd shows a new URL which is meant to link through to the actual job details but this is where the 404 is returned. You will notice the slug change from JOBS to JOB (missing the ‘s’)If I activate any other theme including your Boss theme (not child) the URL’s in both screenshots stay the same but the posting displays with no problem.
I do have some custom unctions in my functions.php in my child theme. Below is the code I have within that (I apologise for the mass content but not quite sure how else I can display code in this post `// logout redirect
add_action(‘wp_logout’,’go_home’);
function go_home(){
wp_redirect( home_url() );
exit();
}// logged in user redirect to different home page to logged out users
if( is_user_logged_in() ) {
$page = get_page_by_title( ‘Logged in home page’);
update_option( ‘page_on_front’, $page->ID );
update_option( ‘show_on_front’, ‘page’ );
}
else {
$page = get_page_by_title( ‘home’ );
update_option( ‘page_on_front’, $page->ID );
update_option( ‘show_on_front’, ‘page’ );
}// reorder profile nav bar
function my_change_profile_tab_order() {
global $bp;
$bp->bp_nav[‘profile’][‘position’] = 10;
$bp->bp_nav[‘wall’][‘position’] = 20;
$bp->bp_nav[‘photos’][‘position’] = 30;
$bp->bp_nav[‘notifications’][‘position’] = 40;
$bp->bp_nav[‘messages’][‘position’] = 50;
$bp->bp_nav[‘following’][‘position’] = 60;
$bp->bp_nav[‘followers’][‘position’] = 70;
$bp->bp_nav[‘friends’][‘position’] = 80;
$bp->bp_nav[‘groups’][‘position’] = 90;
$bp->bp_nav[‘forums’][‘position’] = 100;
$bp->bp_nav[‘settings’][‘position’] = 110;
}
add_action( ‘bp_setup_nav’, ‘my_change_profile_tab_order’, 999 );// replace @wordpress email address with site branded address
/* auto-detect the server so you only have to enter the front/from half of the email address, including the @ sign */
function xyz_filter_wp_mail_from($email){
/* start of code lifted from wordpress core, at http://svn.automattic.com/wordpress/tags/3.4/wp-includes/pluggable.php */
$sitename = strtolower( $_SERVER[‘SERVER_NAME’] );
if ( substr( $sitename, 0, 4 ) == ‘www.’ ) {
$sitename = substr( $sitename, 4 );
}
/* end of code lifted from wordpress core */
$myfront = “administrator@”;
$myback = $sitename;
$myfrom = $myfront . $myback;
return $myfrom;
}
add_filter(“wp_mail_from”, “xyz_filter_wp_mail_from”);// hide buddyboss social section in front end and edit profile pages
function remove_bb_social(){
remove_action( ‘bp_after_profile_field_content’ , ‘buddyboss_user_social_fields’ );
}
add_action( ‘init’ , ‘remove_bb_social’ );//hide admin user from member list
add_action(‘bp_ajax_querystring’,’bpdev_exclude_users’,20,2);
function bpdev_exclude_users($qs=false,$object=false){
//list of users to exclude$excluded_user=’1,2,3′;//comma separated ids of users whom you want to exclude
if($object!=’members’)//hide for members only
return $qs;
$args=wp_parse_args($qs);
//check if we are searching for friends list etc?, do not exclude in this case
if(!empty($args[‘user_id’])||!empty($args[‘search_terms’]))
return $qs;
if(!empty($args[‘exclude’]))
$args[‘exclude’]=$args[‘exclude’].’,’.$excluded_user;
else
$args[‘exclude’]=$excluded_user;
$qs=build_query($args);
return $qs;
}April 3, 2015 at 4:52 am #38461@jellyjumpmediaI have mode some progress, I swapped over my functions.php which has custom functions in with the original functions.php file and the problem goes away so with that I added each custom function one by one testing each before I applied the next.
It appears the one custom function that is causing this problem is
// logged in user redirect to different home page to logged out users
if( is_user_logged_in() ) {
$page = get_page_by_title( ‘Logged in home page’);
update_option( ‘page_on_front’, $page->ID );
update_option( ‘show_on_front’, ‘page’ );
}
else {
$page = get_page_by_title( ‘home’ );
update_option( ‘page_on_front’, $page->ID );
update_option( ‘show_on_front’, ‘page’ );
}If do not add this function to the functions.php file it works as it should with no 404 error.
This function code is to allow users when logged in to view a different home page (the main home page is great for non-logged in users as it displays things such as ‘create an account’ and ‘login’ but when logged in it makes no sense having this kind of page layout).
I will need to play about with the code or as it wasn’t my code at least see if I can find something similar to allow a different home page from being viewable when logged in (without having to redirect to that page as I want my logged in users to be directed to which ever page they were one when the logged in, the logged in users home page will be viewable when the users selects the ‘home page’)
If you don;t mind I’ll keep this thread open for now in case one of the buddyboss team or your users have a suggestion on how I can get the logged in logged out home page to work without giving the the 404 error.
Thanks
April 3, 2015 at 5:42 am #38462@
Anonymous@jellyjumpmedia It will be better you use some membership plugin or role base redirection approach.
- The question ‘404 page display’ is closed to new replies.