Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. General Discussion
  3. Make project thumbnails unclickable or even use custom link.

Make project thumbnails unclickable or even use custom link.

Scheduled Pinned Locked Moved General Discussion
4 Posts 2 Posters 418 Views
  • 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 Offline
    L Offline
    l_s
    wrote on last edited by l_s
    #1

    (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
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      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
      0
      • L Offline
        L Offline
        l_s
        wrote on last edited by l_s
        #3

        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
        0
        • mariusjopenM Offline
          mariusjopenM Offline
          mariusjopen
          Global Moderator
          wrote on last edited by
          #4

          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
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          I also code custom websites or custom Lay features.
          šŸ’æ Email me here: šŸ’æ
          info@laytheme.com

          Before you post:
          1. When using a WordPress Cache plugin, disable it or clear your cache.
          2. Update Lay Theme and all Lay Theme Addons
          3. Disable all Plugins
          4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

          This often solves issues you might run into

          When you post:
          1. Post a link to where the problem is
          2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
          3. If the problem is difficult to explain, post screenshots / link to a video to explain it
          Online Users
          arminunruhA
          arminunruh
          J
          joackim
          C
          craigfeldspar
          Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
          laytheme.com
          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Recent
          • Tags
          • Popular
          • Users
          • Search