Lay Theme Forum

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

    Make project thumbnails unclickable or even use custom link.

    General Discussion
    2
    4
    334
    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.
    • L
      l_s last edited by l_s

      (Picking up on Re: Project thumbnails - disable links on specific elements)

      Hi all,

      I've been trying to create a one-pager website, showing a selection of projects with the project gridder so that I don't need to do everything manually and can control the selection via categories.

      Now I tried via css to make the links unclickable but this disables the hover as well. Now I'm wondering whether there's a way to remove the href entries via JS or use the code snippet plugin and override the php structure.
      Even better would be exchanging the href with a a custom link. I need a mailto: using the project's title as its ?subject and one linking to a mailchimp signup prompt in a modal or new page.

      Any ideas? @mariusjopen @arminunruh maybe? @fabiofrl did you get any further insight on the topic?

      Any input highly appreciated, many thanks!

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

        Dear @l_s
        can you explain a little more in detail what exactly you want to achieve?

        Best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • L
          l_s last edited by l_s

          For anyone interested, since the help here is clearly limited:

          In the end, I solved the issue with the Plugin "Code Snippets", which I use to execute a php redirect, coming into play whenever a post (in Laytheme = projects) is loaded:

          add_action('template_redirect', 'proj_redirect_to_home');
          
          function proj_redirect_to_home()
          {
          global $post;
              if (is_single() && $post->post_type=='post') {
          		$redirect_title = urlencode(get_the_title());
                  wp_redirect( esc_url('https://www.domain.com/contact-order/') .'?subject='.$redirect_title );
                  exit();
              }
          }
          

          Now I redirect to a form, which sits on a separate page. The form is generated by Contact Form 7, which needs to be extended by another plugin called Contact Form 7 - Dynamic Text Extension, to use the dynamic field get parameter. This should be more comfortable than a mailto.

          Then, I have a footer activated for all projects, where I have the following function added as a html snippet in the gridder:

          <script>
          window.laytheme.on("newpageshown", function(layoutObj, type, obj){
          	if(type == "project"){
          		location.reload();
          	}
          });
          </script>
          

          Since Laytheme runs as a single page app, the page needs to be refreshed to execute the redirect.
          This can also be done by editing Laytheme's frontend.app.js but that's more complicated plus you get issues while updating, obviously.

          Cheers :)

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

            Dear @l_s
            cool!

            We give our best to help. But when it goes into more deep problem solving – we cannot help everywhere.

            Thank you for sharing!

            Best!

            Marius

            www.mariusjopen.world

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

            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

            A
            B
            C
            F

            Recent Topics

            • K

              Unable to update lay theme / to login wp admin

            • S

              Theme crashed - because of Polylang?

            • A

              New button feature not available

            • A

              carousel addon not working after update

            laytheme.com