Edward Caissie
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: List Current Users Recent Posts In SidebarI’m glad it is working for you …
To add a message … try this at the end of your code instead of what you are using:
... wp_reset_query(); } else { echo "Please login to view your recent posts."; } ?>You can modify the message inside the quotes to what suits your needs best.
Forum: Fixing WordPress
In reply to: List Current Users Recent Posts In SidebarMaybe try something like this:
<?php if ( is_user_logged_in() ) { $user_id = get_current_user_id(); query_posts( "author=$user_id&posts_per_page=6" ); // insert your loop code here wp_reset_query(); } else { // display non-logged in user content } ?>You can likely copy the_Loop code from your theme and paste it in where I wrote the ‘// insert your loop code here’ comment.
Forum: Fixing WordPress
In reply to: How to display content for specific users ?You are very welcome! I’m glad it is working for you.
Forum: Fixing WordPress
In reply to: How to display content for specific users ?The function is found in ../wp-includes/user.php
I have no idea why you are getting that error though.
Forum: Fixing WordPress
In reply to: How to display content for specific users ?Yes, you are correct. The test site had other code that was providing the $user_id variable with its value. Try this:
<?php $user_id = get_current_user_id(); if ( is_user_logged_in() ) { if ( $user_id == 2 ) { // display user_id = 2 content } elseif ( $user_id == 3 ) { // display user_id = 3 content } else { // display other user_id content } } else { // display content for guests } ?>The ‘is_user_logged_in()’ conditional may not be absolutely necessary, its just a nice-to-do check.
Forum: Fixing WordPress
In reply to: Display content of a specific page on home pageYou’re welcome! It is definitely a quick fix, just glad it worked for you.
Forum: Fixing WordPress
In reply to: How to display content for specific users ?I quickly tested it using three different users on one of my test servers before posting … everything seemed fine to me.
Did you manually edit the sample above to match the specific ID of the users you want to display the different content to?
Forum: Fixing WordPress
In reply to: Newbie here – Why can't I get "nested" pages not showingThe theme appears to allow for a depth of 3 items for the menu.
Try this:
- Enter your custom menu name.
- Click the “Save Menu” button.
- Make sure your menu name is showing in the Theme Location box.
- Click the “Save” button in the Theme Location box
- Add your items to the menu in the order and hierarchy you want, remember only 3 deep including the parent.
- Click the “Save Menu” button, again
It worked for me testing with the same theme … see how it works for you.
Forum: Fixing WordPress
In reply to: Newbie here – Why can't I get "nested" pages not showingThis sounds like a theme related issue … my first thought would be the page display mechanism being used is set to
depth=1.A link to your URL and the current theme you are using would be helpful to suggest other possibilities.
Forum: Fixing WordPress
In reply to: How to display content for specific users ?You can try inserting this code into your sidebar.php template file:
<?php if ( is_user_logged_in() ) { if ( $user_id = 2 ) { // display user_id = 2 content } elseif ( $user_id = 3 ) { // display user_id = 3 content } else { // display other user_id content } } else { // display content for guests } ?>Forum: Fixing WordPress
In reply to: Display content of a specific page on home pageYou will likely need to clean-up the output but this may get you started:
<?php $home_page_post_id = 265; $home_page_post = get_post( $home_page_post_id, ARRAY_A ); $content_home = $home_page_post['post_content']; echo $content_home; ?>Look at the
get_postfunction for more details on how it is working: http://codex.wordpress.org/Function_Reference/get_postForum: Fixing WordPress
In reply to: Author that's not a UserYou can try this: get a single gmail account for your “mock users” then use the gmail “+” function to make them unique for each author.
For example:
yourname+author_1@gmail.com
yourname+author_2@gmail.com
yourname+author_3@gmail.com
yourname+author_4@gmail.com
etc.All of the above resolve to yourname@gmail.com and are valid email addresses.
PS: Please note the email address is only used for example purposes.
Forum: Themes and Templates
In reply to: Need to change color of blog name and page namesYou’re welcome!
Forum: Themes and Templates
In reply to: Need to change color of blog name and page namesThe details for the color can be found on lines 53 and 54 of your style.css file. This is from line 53:
.header h1 a { color:#000000; font-variant:small-caps; text-decoration:none; }… (from line 54) change the color above to: #574F4B;
Forum: Networking WordPress
In reply to: How do I really set up multisites?Try this page: http://codex.wordpress.org/Tools_Network_SubPanel