Search Results for 'code'
-
Search Results
-
I am trying to implement a search box inside a Buddypress group that searches on the contents of the Group Forum. I found some helpful instructions here
Basically, I pasted the following code outside the loop in the “content-single-forum.php” file. (Of course this was done to a copy of the bbpress file which I imported into my theme’s bbpress folder):
<h3>Search Forum</h3> <form role="search" method="get" id="bbp-searchform" action=""> <label for="ts">Search the support forum topics</label> <input type="text" name="ts" id="ts" value="<?php echo ( isset( $_REQUEST['ts'] ) ) ? $_REQUEST['ts'] : ''; ?>" /> <input type="submit" id="searchsubmit" value="Search" /> </form>This code however, performs search only on the topics and not the replies.
Can someone suggest appropriate modifications to the code so that it searches on both topics and replies rather than just the topics.
Many thanks!
Topic: Password protecting forums?
Do I password protect the page that the forum short code is on, or what? Password protecting the page does nothing. I’m running the Enfold theme by Kriesi.
I need to make a set of users have access to the forums, and password protect everything inside of them, and certain people be able to edit, and all be able to post.
I created link to user’s profile by code:
<?php global $current_user; get_currentuserinfo(); //echo '<pre>'; //print_r($current_user); ?> <ul class="hd-account"> <?php $first_name = $current_user->user_firstname; $last_name = $current_user->user_lastname;?> <li><a href="<?php echo home_url().'/forums/profile/'.$current_user->user_login.'/'; ?>">Xin chào, <?php if ($first_name == '' || $last_name == '' ) echo $current_user->display_name; else echo $first_name.' '.$last_name; ?></a></li> <li><a href="<?php echo wp_logout_url(home_url()); ?>">Thoát</a></li> </ul>I create this in theme’s header.php (not TwentyEleven …). Example, I have a link like that http://localhost/cars/forums/profile/namnguyen/. I click it and get an error “404 not found”, I don’t know why. Can someone help me?