-
AuthorPosts
-
October 4, 2019 at 3:52 am #1144814
Ok, been fighting several things, so I will make a post for each.
If I login via my wp-login page as admin, the page https://enjoyncwithme.com/all-listings/ shows proper. If I login as one of my Contributor logins, then the ads have moved up into the header. Any idea why?
- This topic was modified 5 years, 2 months ago by Cool_Bob.
October 4, 2019 at 11:26 pm #1145171Hey Cool_Bob,
The screenshoots above are not working for me. Also, can you provide a login for each type of account?
Best regards,
Jordan ShannonOctober 5, 2019 at 12:53 am #1145185This reply has been marked as private.October 6, 2019 at 8:55 pm #1145519Hi,
Thank you for the logins and screenshots, as a Contributor you do not have the filter bar or some of the other elements so the content moves up, so we should be able to add some padding to the top to correct, but the issue is that this is a different page-id and almost no different classes to hook into to apply css only to this one user type.
So I added this css based on being “logged-in” but not having the “admin-bar” This works fine for the Admin & Contributor but if you have other users types I’m not sure what will happen, please check.#top.page.logged-in:not(.admin-bar) #main > div.container_wrap.container_wrap_first.main_color.fullsize > div > main { padding-top: 270px !important; }
I did add this css for you so please clear your browser cache and check and test as your different users.
Best regards,
MikeOctober 6, 2019 at 10:06 pm #1145552THANKS! Just set up a totally new user for testing. I got the following.
https://www.dropbox.com/s/4k8jx91sw270g92/Photo%20Oct%2006%2C%203%2046%2044%20PM%20%281%29.jpg?dl=0
https://www.dropbox.com/s/9658kiezoa1tczr/Photo%20Oct%2006%2C%203%2031%2057%20PM.jpg?dl=0
October 6, 2019 at 10:19 pm #1145555Hi,
Thanks, but in your screenshot the test user has the “admin-bar” so the css will not fire, with the Contributor account you gave us the “admin-bar” didn’t show so I assumed that all Contributors would not have the “admin-bar”
How many user types are you going to use?Best regards,
MikeOctober 6, 2019 at 11:02 pm #1145559Hi,
So assuming that it is certain user roles that is not getting the top element height, I have this function that will add the role as a class to the body:function add_role_to_body($classes) { global $current_user; $user_role = $current_user->roles; return array_merge( $classes, array( $user_role[0] ) ); } add_filter('body_class','add_role_to_body');
This is added to the end of the functions.php file in Appearance > Editor
Then the css above can be written with the user role:
#top.contributor #main > div.container_wrap.container_wrap_first.main_color.fullsize > div > main { padding-top: 270px !important; }
this would be added to the Quick CSS, and duplicated for each role, replacing “contributor” with “editor” “author”, etc.
Unfortunately the page-id seems to change with each user.Best regards,
MikeOctober 6, 2019 at 11:07 pm #1145561Excellent point, and I had to think on that a few minutes to try and figure out what the difference was between the first Contributor login that I provided, and the second Contributor login that I just created.
After a test, I found it. The first Contributor login had already created several ads. The second Contributor login had not. After I post a ad using the second (new) Contributor login, below is what I see when I login from wp-login as that Contributor.
https://www.dropbox.com/s/5rliwe098dw3zxe/Photo%20Oct%2006%2C%204%2057%2046%20PM.jpg?dl=0
Reference Roles that I plan to use, for now just Administrator/ Key Master, Administrator, and Contributor.
October 6, 2019 at 11:34 pm #1145562Hi,
Thanks for the feedback, I added the function as contributor css above and it is working for “Betty Jean”
Please try with your other contributor.
Please be sure to clear your browser cache.
The admin account “knothead” didn’t need the css fix, so I assume none of your admins will need it.Best regards,
MikeOctober 6, 2019 at 11:50 pm #1145563WORKED!!
Thanks so much. It would have taken me weeks to figure all that out on my own. Once again, y’all rock!
https://www.dropbox.com/s/rrydjh0kpw312m4/Photo%20Oct%2006%2C%205%2046%2004%20PM.jpg?dl=0
- This reply was modified 5 years, 2 months ago by Cool_Bob.
October 7, 2019 at 12:18 am #1145567Hi,
Glad we were able to help, we will close this now. Thank you for using Enfold.For your information, you can take a look at Enfold documentation here
For any other questions or issues, feel free to start new threads in the Enfold forum and we will gladly try to help you :)Best regards,
Mike -
AuthorPosts
- The topic ‘Why Does My Ads Move Up……..’ is closed to new replies.