Forums

Forum tab (12 posts)

  1. borededitor
    Member
    Posted 3 years ago #

    I own the site http://www.globechat.org/wordpress. I'm trying to get the forum tab on top to link directly to my forum at http://www.globechat.org/smf. Not sure how to do it though. I need to get the site functioning by next week so help would be appreciated.

  2. ClaytonJames
    Member
    Posted 3 years ago #

    Instead of creating a forum "page", you may have to hard code the tab into the theme header/navigation area the same way the "home" tab is coded.

    Look in header.php, and locate this:

    <li <?php if(is_home()){echo 'class="current_page_item"';} else { echo 'class="page_item"';}; ?>><a href="<?php bloginfo('siteurl'); ?>/" title="Home">Home</a></li>

    Perhaps adding an additional, similar line below that with the href and title pointing to your forum, will achieve your goal. I hope that gave you something useful to work with.

  3. borededitor
    Member
    Posted 3 years ago #

    I guess I have to do this offline and upload the php then?

  4. ClaytonJames
    Member
    Posted 3 years ago #

    Easy enough. Start with a backup copy of your theme. Edit header.php to reflect your changes and then upload the file back to the theme's directory. You can use the theme editor in the Dashboard, but there are some possible security implications and file permissions that you need to be aware of and attend to before and after editing. There may be some helpful info about using the theme editor located here.

    http://codex.wordpress.org/Editing_Files

  5. NC@WP
    Member
    Posted 3 years ago #

    There's a simpler way...

    1. Create an empty WordPress page called Forum with the slug forum
    2. Create a file in your theme directory called forum.php
    3. In that file, put the following:
      <?php 
      
      header('Location: http://www.globechat.org/smf/');
      die();
      
      ?>

      Be sure that the file starts with <?php and there is no whitespace in front of the <.

    This will create a link to the (empty) forum page, which would redirect to the forum.

  6. ClaytonJames
    Member
    Posted 3 years ago #

    @ NC@WP

    That is good info. I believe I used a similar method when installing the Simple Forum from Yellow Swordfish, but never even considered it in this case. I will file this away in my notes for future use. Thank you...

    @ borededitor

    Further food for thought once you have that working....

    I have read about forum integration plugins for WordPress using SMF, but have never tried any of them. These might be worth some research just for the knowledge alone; WP SMF Bridge Plugin, and the CMS & SMF Plugin. Not to suggest that you get ahead of yourself, but I think I remember them offering some type of user login/info integration.

    Best wishes.

  7. joeylowe
    Member
    Posted 3 years ago #

    Hi, I'm trying to do the same thing here at http://www.tradecubate.com. I followed NC@WP's instructions. I created a blank page named 'Trellis Desk' and published to my theme. BTW I use iThemes Blogging Success Theme.

    I then created a php file in Notepad and subbed out the link in NC@WP's post for http://www.tradecubate.com/trellis/Upload/index.php. I also tried without the "index.php" path. Both times, whenever I click on the link in the nav bar, the browser is directed to the blank page instead of redirected to the site that I'm trying to link to. What am I missing?

    Here is the content of the php file that I created if it will help.

    <?php 
    
    header('Location: http://www.tradecubate.com/trellis/Upload/');
    die();
    
    ?>

    The correct path that I'm trying to link to is

    http://www.tradecubate.com/trellis/Upload/index.php

    Thanks for help!

  8. soulmandk
    Member
    Posted 3 years ago #

    Did anyone ever get this to work? I tried it too and i can't seem to make it functional.

    Did the same as the above just named "test" and test.php, uploaded it to my theme folder (and the one outside, just to be sure) and it doesnt work. I am on WP 2.7

  9. t31os
    Member
    Posted 3 years ago #

    Did you give your page the correct slug to... as mentioned in the information above...

  10. soulmandk
    Member
    Posted 3 years ago #

    No I probably didn't as I am on the ColdStone theme and I cant seem to see the "slug" anywhere... When I press "screen options" i can see that it is not "ticked off" so it is probably not active, how can I do that and where?

  11. t31os
    Member
    Posted 3 years ago #

    That's strange, they don't actually have slugs when you create them, so i'm not sure what was being referred to before...

    It was just a suggestion...

    The above code simply re-directs anyway, there's no reason you have to do it that way...

    You could always add this into your page.php, purely an example...

    <?php if(is_page('forum')) : ?>
    REDIRECT CODE
    <?php endif; ?>

    It would need to be before the get_header() i think...

    There's a number of ways to re-direct (google if you must), but i can't say for definite the above will work, but in theory it should do.... with the necessary re-direct code in place..

  12. manansaini
    Member
    Posted 2 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic