Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #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 one was when I logged in as admin.

    This one was logged in as one of my Contributor accounts.

    No fancy third party plugin for login panel.

    http://www.enjoyncwithme.com

    • This topic was modified 5 years, 2 months ago by Cool_Bob.
    #1145171

    Hey Cool_Bob,

    The screenshoots above are not working for me. Also, can you provide a login for each type of account?

    Best regards,
    Jordan Shannon

    #1145185
    This reply has been marked as private.
    #1145519

    Hi,
    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,
    Mike

    #1145552
    #1145555

    Hi,
    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,
    Mike

    #1145559

    Hi,
    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,
    Mike

    #1145561

    Excellent 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.

    #1145562

    Hi,
    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,
    Mike

    #1145563

    WORKED!!

    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.
    #1145567

    Hi,
    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

Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Why Does My Ads Move Up……..’ is closed to new replies.