Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Place fixed element on every project of a category

    General Discussion
    3
    8
    495
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      michael_vvc last edited by

      Hi Armin and Marius,

      i decided to place a fixed object to every project, which allows the user to close a project and go back to the category where the user can find an overview of all the projects.

      For now I did it like this: I placed the fixed element in every single project. Is it also possible to place an object like this to all projects of a category kind of automatically?

      Thanks for your help!

      :wrench:

      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        Hi Michael!

        At first there came a plugin like Advanced Custom Fields to my mind which lets you create additional fields.

        But the problem is that it does not work together with Laytheme because there is no option to enter custom PHP code.

        So what might be a solution that you create a button in the custom HTML area. This button is triggered to a little jQuery function which lets you close the project and go back to the overview.

        Maybe you don't even need jQuery for this. Does a normal link back to the project page not work?

        Let me know if you face trouble!

        Best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • M
          michael_vvc last edited by

          Hi Marius,

          thanks for your reply and your tipps. For now I did it the simpel way, which is working well: Placing a text link in the gridder, set html class and add the following code in custom html:

          .fixed-element{
          position: fixed;
          top: 20px;
          right: 20px;
          z-index: 5;
          }

          Everything is working fine that way. The problem is that I am doing the website for another person and I want him to be able to upload a project without placing this link each time. So I am wondering if there's a way to place this link for all projects of one categorie in one step?

          1 Reply Last reply Reply Quote 0
          • mariusjopen
            mariusjopen Global Moderator last edited by

            Hey Michi!

            Yes I understand. It can be annoying for clients to make something like this every time.

            Maybe you can solve it with the solution I wrote above.

            All the best!

            Marius

            www.mariusjopen.world

            L 1 Reply Last reply Reply Quote 0
            • L
              lortnok @mariusjopen last edited by

              @mariusjopen Hi Marius, I have the same question, and I found not the best solution to use a go back/link back idea, if you meant this one:
              <script>
              function goBack() {
              window.history.back();
              because if someone just sends a link of one of the project than the person who opens it will not manage to get to the main menu, project page, but to the previously visited one.

              Anyway my question is this: I have seen it is possible to set id and class in the gridder when I just right click on the background, is this would be a class for that page/project? If yes how could I find the right selector, since I couldn't figure it out...

              Here is what I did:
              body:not(.id-369):not(.id-569):not(.id-252):not(.id-588):not(.id-494):not(.id-493):not(.id-672) #matex{
              display: none;

              would it be be possible to use a certain category for these pages, or a class so when a new project is created the custom css doesn't need to be rewritten?

              L 1 Reply Last reply Reply Quote 0
              • L
                lortnok @lortnok last edited by lortnok

                solved.

                body:not(.category-25) #matex{
                display: none !important;

                But what happens when I have a page? would be possible to also give pages categories or sth like that?
                I am asking you this because what I am trying to achieve is a website for our studio and basically separate portfolio sites with a different menu, technically these would be one website. different X buttons for the projects that all pointing to the right project page. for instance. It is working out so far, but again I will face the same difficulty with pages. If there would be categories for pages than I could just say put the page into the xy category if you want a menu button or whatever.
                Thank for any tip in advance :)

                1 Reply Last reply Reply Quote 0
                • mariusjopen
                  mariusjopen Global Moderator last edited by

                  Dear @lortnok
                  thank you for sharing your solution with us!

                  Each page has a page ID. You could use this instead.
                  But categories is not possible :-/

                  Best!

                  Marius

                  www.mariusjopen.world

                  L 1 Reply Last reply Reply Quote 1
                  • L
                    lortnok @mariusjopen last edited by

                    @mariusjopen yep, that is not the best, but thanks

                    1 Reply Last reply Reply Quote 1
                    • First post
                      Last post

                    I don't answer or check forum DMs, please just post on the forum.

                    Try this to fix issues before you post:

                    Use the Search Feature. Maybe there is already a solution to your issue.

                    1. Update Lay Theme and all Lay Theme Addons
                    2. Disable all Plugins
                    3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
                    4. Now see if your problem solved itself
                    5. Go here, see if your problem is listed here:
                    Troubleshooting

                    When you post:
                    1. Post a link to where the problem is
                    2. If the problem is difficult to explain, post screenshots / link to a video to explain it

                    Thanks!

                    Online Users

                    L
                    E
                    M
                    C
                    M
                    S

                    Recent Topics

                    • T

                      thumbnail grid categories fixed.

                    • L

                      BLEND MODE ON MOBILE

                    • A

                      A modal/pop up window displaying extra info

                    • Carousel is not showing

                    laytheme.com