Search Results for 'code'
-
Search Results
-
Topic: Profile in menu – php
WP 4.6 BBpress plugin 2.5.10
I am using some of the super BBpress code suggestions at https://codex.bbpress.org/layout-and-functionality-examples-you-can-use/ and most work just fine ‘out of the box’ but I am not sure what I should be putting in place of ‘ my_nav_menu_profile_link’ in this one. If I put in the code as is….// 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_nicename ; $profilelink = '<li><a href="/forums/users/' . $user . '/edit">Edit Profile</a></li>'; $menu = $menu . $profilelink; return $menu; }I get this when trying the menu link……
Object not found!
The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
If you think this is a server error, please contact the webmaster.
Error 404
localhost
Apache/2.4.23 (Win32) OpenSSL/1.0.2h PHP/5.6.24If I replace the ‘ my_nav_menu_profile_link’ with the actual link like this…..
/* Profile link in menu....................*/ // Filter wp_nav_menu() to add profile link add_filter( 'wp_nav_menu_items', 'http://localhost/wordpress/wp-admin/profile.php' ); function http://localhost/wordpress/wp-admin/profile.php($menu) { if (!is_user_logged_in()) return $menu; else $current_user = wp_get_current_user(); $user=$current_user->user_nicename ; $profilelink = '<li><a href="/forums/users/' . $user . '/edit">Edit Profile</a></li>'; $menu = $menu . $profilelink; return $menu; }I get this as soon as I go to the site…
Parse error: syntax error, unexpected ‘:’, expecting ‘(‘ in C:\xampp\htdocs\wordpress\wp-content\themes\twentytenchild\functions.php on line 49
What should I be entering and when I move to a live site will it need to be further changed?I have a client with a request that seems simple but I am having a dilly of a time figuring it out.
They want to be able to charge users for premium posts. These posts will *not* appear at the top. Instead they will look different from other posts – bolded links, different color font – not at the users choice simply coded in by us. This will be a one time thing for a user – the users should not be able to do any other posts this way. I already set up the forum so that the client will approve all posts – he wants to be able to go in and click a button that will then style that post a different way.
I can style the sticky to do this easily and have done so on my demo but am unsure how to proceed with his request. I do have a child theme.
I know enough code to add stuff into functions and php pages. I am much better at HTML5 and CSS (can do animations).
I have tried a few things I came up with on my own but they do not work and rather than show them I would rather hear your thoughts.
Here is my demo – it is still pretty primitive… http://www.contentandsolutions.com/njywf/
I am using
Wordpress Version 4.6.1Customizr theme using child theme. Customizr Version: 3.4.23
BBPress Plugin Version 2.5.10
Code or a plugin (even a paid for plugin) if possible. Thank you!
I deactivated bbpress today, and the next thing all site is broke with HTTP code 500.
I tried to reset plugins, reset themes, checked for htaccess entries, nothing.
I put it back, no chance.Class ‘BBP_Theme_Compat’ not found in /home/sites/pcforum.ro/public_html/wp-content/themes/pcf/functions_bb.php on line 32
Update – i fix it.
Found the code and remove it. ThanksI read through this forum because I am experiencing similar issues…(I am a keyholder). I am using both Buddypress and bbpress. I do not have programming knowledge or experience, I do not understand codex or php, I’m just looking for someone to hopefully assist me with a simple solution to these issues, so that when people sign up as users, their interactions are seamless and they are able to quickly find the information they are looking for.
1. When logged in as a user, I am not able to access forums without using the URL to the page. I used the “user roles and capabilities” plugin as recommended above, to change the user settings in the back end so I could view “private” posts and that sort of worked but I still have to use the URL to find the forum page. I have also run the tools for both Buddypress and bbpress. There are several links in the user profile area but they all seem to direct me to the user activities only…I cannot link to any of the content posted by other users through those links. (Same with the tool bar at the top of the page and all of the drop down menus).
2. I just created a topic to post under a forum. Under my keyholder account, I am able to see the topic when I click on it but when I try clicking on it as a user, it doesnt show up. It just tells me there is “0 replies, has 1 post, and last updated by me” and the topic is not there.


