Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum theme not working…


  • cybarmitzvah
    Participant

    @cybarmitzvah

    Thanks Stephen Edgar for the help, in request by him, I am posting this here and starting this new topic:

    disable front end editing

    So basically on the forum, when someone clicks edit my profile at the top of the page, it goes to the backend. Even though, it would be preferable to go to the front end. Currently, the only way a user can go to the front end is by clicking their name next to a post or in a topic/replies sequence.

    I am using the mesocolumn theme and am new to wordpress. site: http://www.astronomertalk.com

    I also moved template-full-width.php, to my child theme, and called it bbpress.php. After doing this, nothing has changed except now the forum specific sidebar, that came with the theme, does not show up.

    Source code from bbpress.php:

    <?php
    /*
    Template Name: Full Width
    */
    ?>
    
    <?php get_header(); ?>
    
    <?php do_action( 'bp_before_content' ); ?>
    <!-- CONTENT START -->
    <div class="content full-width">
    <div class="content-inner">
    
    <?php do_action( 'bp_before_blog_home' ); ?>
    
    <!-- POST ENTRY -->
    <div id="post-entry">
    <section class="post-entry-inner">
    
    <?php if (have_posts()) : ?><?php while (have_posts()) : the_post(); ?>
    
    <article <?php post_class('post-single page-single'); ?> id="post-<?php the_ID(); ?>">
    
    <h1 class="post-title entry-title"><?php the_title(); ?></h1>
    
    <div class="post-content">
    <div class="entry-content"><?php the_content( __('...Continue reading', TEMPLATE_DOMAIN) ); ?></div>
    <?php wp_link_pages('before=<div id="page-links">&after=</div>'); ?>
    
    </div><!-- POST CONTENT END -->
    
    </article>
    
    <?php endwhile; ?>
    <?php comments_template(); ?>
    <?php else : ?>
    <?php get_template_part( 'lib/templates/result' ); ?>
    <?php endif; ?>
    
    </section>
    </div>
    <!-- POST ENTRY END -->
    
    <?php do_action( 'bp_after_blog_home' ); ?>
    
    </div><!-- CONTENT INNER END -->
    </div><!-- CONTENT END -->
    
    <?php do_action( 'bp_after_content' ); ?>
    
    <?php get_footer(); ?>

    Thank You,
    JB

Viewing 25 replies - 1 through 25 (of 40 total)

  • Robin W
    Moderator

    @robin-w

    So basically on the forum, when someone clicks edit my profile at the top of the page, it goes to the backend. Even though, it would be preferable to go to the front end.

    I would not let users see the toolbar, this is really just for admins.

    You need to disable the toolbar – add this to your functions file

    add_filter('show_admin_bar', '__return_false');
    

    then put the profile into your menu

    Layout and functionality – Examples you can use


    Robin W
    Moderator

    @robin-w

    I also moved template-full-width.php, to my child theme, and called it bbpress.php. After doing this, nothing has changed except now the forum specific sidebar, that came with the theme, does not show up.

    so what would you like to happen, all I can see on your site is your forum with a sidebar


    cybarmitzvah
    Participant

    @cybarmitzvah

    Hi I just tried to add your code to the site.

    add_filter('show_admin_bar', '__return_false');
    Warning: Cannot modify header information - headers already sent by (output started at /home/vaghar123/public_html/wp-content/themes/awesome/functions.php:1) in /home/vaghar123/public_html/wp-includes/pluggable.php on line 1121

    and tat was the error I got from a non admin account.


    Robkk
    Moderator

    @robkk

    @cybarmitzvah contact your themes author too if you havent already , they might know more about the problems your facing

    i checked out your theme and it seems compatible with buddypress , im just going to assume bbpress too so the theme author would help alot.


    cybarmitzvah
    Participant

    @cybarmitzvah

    Hi Robkk,

    The theme author is not very present in the support forum and it takes a long time to get answers. I like Robins idea, seems to make sense. Just need to fund out how to fix the error.

    JB


    Robin W
    Moderator

    @robin-w

    suspect you have a whitespace in your functions file

    Whitespace before <?php when “functions.php line 1” mentioned

    If the message says the error is in line 1, then it is typically leading whitespace, text or HTML before the opening <?php marker.

    eg

     <?php
    

    not

    <?php


    cybarmitzvah
    Participant

    @cybarmitzvah

    My functions file is actually blank because I was using the one in my child theme…


    Robin W
    Moderator

    @robin-w

    the error code is saying that you have whitespace in

    wp-content/themes/awesome/functions.php:1

    If this is a blank file, then delete it.

    If not, then it has a problem on line 1


    cybarmitzvah
    Participant

    @cybarmitzvah

    ok, I will delete it, but then, where do I put the code?


    Robin W
    Moderator

    @robin-w

    Uh?? You’ve lost me !

    If you have a child theme, your functions file should be in the child theme, and that is where you should put it. If there was a functions file in your main theme, then you should have left that alone. if there wasn’t then there shouldn’t be.

    The error is saying that it is likely you have whitespace in line 1 of your awesome theme, which I think is your child theme.


    cybarmitzvah
    Participant

    @cybarmitzvah

    Uhh?? Where did I loose you? … and where is stpehen Edgar?

    I do not have a functions file in my child theme. I tried creating a blank file and calling it functions.php and the code just showed up on the top of my page. Then I tried just adding that code you gave me to the mesocolumn functions file and once again the code just screwed up and showed up at the top of my page under the admin bar.

    So, once again, what should I do from here?

    Ohh and there is no white space.

    Thank You,
    JB


    Robkk
    Moderator

    @robkk

    ok im going to run this locally in a minute.


    Robkk
    Moderator

    @robkk

    i created a child theme with mesocolumn

    i added robins code and it worked fine.

    even when i switched to a different role


    cybarmitzvah
    Participant

    @cybarmitzvah

    It wont work on mine 🙁

    Be clear, where did you add his code? Did you make a new functions file?

    TY
    JB


    Robkk
    Moderator

    @robkk

    in my child theme i have one functions.php

    this is the entire code.

    <?php
    
    /* Add custom functions below */
    add_filter('show_admin_bar', '__return_false');

    cybarmitzvah
    Participant

    @cybarmitzvah

    Nice!

    works not, I just did not have the <?php in my site.


    cybarmitzvah
    Participant

    @cybarmitzvah

    So I just added the code from Robin W’s link,

    however it does not work,

    Layout and functionality – Examples you can use

    I get the edit profile button for logged in users, however, it does not link to their profile. Could it be that I am using social login.?

    Plus, I would prefer it to stay all the way to the right. Plus, preferably, look more like this sites, with the username and photo of the person logged in, in the top right.

    JB


    Robkk
    Moderator

    @robkk

    works not, I just did not have the <?php in my site.

    it works now??

    So I just added the code from Robin W’s link,

    however it does not work,

    ill test out that profile link ,

    if you think its social login , deactivate and see if robins profile link code works.

    Plus, I would prefer it to stay all the way to the right.

    im sure its just positioning it with css , but hey it doesnt have to be floated right, not a big deal if it is or not.

    Plus, preferably, look more like this sites, with the username and photo of the person logged in, in the top right.

    i just achieved this today. But it required a lot of work with my theme.


    cybarmitzvah
    Participant

    @cybarmitzvah

    it works now??

    yes

    ill test out that profile link ,

    if you think its social login , deactivate and see if robins profile link code works.

    still not working

    im sure its just positioning it with css , but hey it doesnt have to be floated right, not a big deal if it is or not.

    will need that code, would appreciate it 🙂

    i just achieved this today. But it required a lot of work with my theme.

    Darn, tell me any steps if you remember

    TY
    JB


    Robkk
    Moderator

    @robkk

    it didnt work for awhile on localhost , then i editing the href link to make it work.

    use this

    // Filter wp_nav_menu() to add profile link
    add_filter( 'wp_nav_menu_items', 'my_nav_menu_profile_link' );
    function my_nav_menu_profile_link($menu) {  
        if (!is_user_logged_in())
            return $menu;
        else
            $current_user = wp_get_current_user();
            $user=$current_user->user_login ;
            $profilelink = '<li><a href="http://www.astronomertalk.com/forums/users/' . $user . '/edit">Edit Profile</a></li>';
            $menu = $menu . $profilelink;
            return $menu;
         
    }

    cybarmitzvah
    Participant

    @cybarmitzvah

    where should I add that?


    Robkk
    Moderator

    @robkk

    add it into functions.php in your child theme


    Robkk
    Moderator

    @robkk

    will need that code, would appreciate it

    ill try it to find out.

    Darn, tell me any steps if you remember

    i didnt use much php


    cybarmitzvah
    Participant

    @cybarmitzvah

    i didnt use much php

    ok…

    also, it added a edit profile to the footer menu as well. I would like to remove that.


    Robkk
    Moderator

    @robkk

    did it work now??

    also, it added a edit profile to the footer menu as well. I would like to remove that.

    idk how to do that maybe robin can help on specifying what menu or something.

    u can hide it with css though.

    you just need the div class , menu id , and menu item id.

    use inspect element to find these.

Viewing 25 replies - 1 through 25 (of 40 total)
  • You must be logged in to reply to this topic.
Skip to toolbar