1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Add a content lock to Wordpress search?

Discussion in 'Blogging' started by Dally, Jan 5, 2012.

  1. Dally

    Dally Junior Member

    Joined:
    Dec 9, 2010
    Messages:
    151
    Likes Received:
    64
    Location:
    UK
    Hey, I am looking for a way to add a content lock to the search button of my wordpress blog. Cannot share my reasoning to do so at the moment, but will share the method soon. I don't want it on the search results, I want it on the search button so that they complete an offer and then get re-directed to the search page.
    Thanks
    Dally
     
  2. KraftyKyle

    KraftyKyle Jr. Executive VIP Jr. VIP Premium Member

    Joined:
    Aug 13, 2008
    Messages:
    1,941
    Likes Received:
    4,609
    Gender:
    Male
    Location:
    Unknown
    For adscendmedia you need to set your content locker to -1 delay by clicking "Edit", then "General Options". In that tab you can also specify the redirect url. Then put this before your search button:
    Code:
    <a href="#" onClick="javascript:initGateway(); return false;">Search button here</a>
     
    • Thanks Thanks x 1
  3. Dally

    Dally Junior Member

    Joined:
    Dec 9, 2010
    Messages:
    151
    Likes Received:
    64
    Location:
    UK
    Sweet thanks, for your help. Do you know where I can view the source of the search button? Wordpress baffles me :batman:
     
  4. twilightofidols

    twilightofidols Power Member

    Joined:
    Nov 11, 2011
    Messages:
    675
    Likes Received:
    223
    Disclaimer: I'm not code guy but when I have to I MacGyver it, so if I'm giving the wrong advice may someone more versed than me chime in.

    Do you have a Searchform.php when you go to edit your theme?

    If so you'd apply the code to something like this...

    Code:
    <input type="submit" class="submit" name="submit" id="searchsubmit" value="<?php esc_attr_e( 'Search', 'twentyeleven' ); ?>" /> 
     
  5. Dally

    Dally Junior Member

    Joined:
    Dec 9, 2010
    Messages:
    151
    Likes Received:
    64
    Location:
    UK
    Yeah my theme does have searchform.php. I'm using thematic, the code for the searchform.php is like this:
    Code:
    <?php
        
        // calls the search form
    thematic_search_form();
    
        
    ?>
    
    It creates this code on the users end:
    Code:
    <form id="searchform" method="get" action="http://mysite.com/" _lpchecked="1">
    		<div>
    			<input id="s" name="s" type="text" value="To search, type and hit enter" onfocus="if (this.value == 'To search, type and hit enter') {this.value = '';}" onblur="if (this.value == '') {this.value = 'To search, type and hit enter';}" size="32" tabindex="1">
    			<input id="searchsubmit" name="searchsubmit" type="submit" value="Search" tabindex="2">
    		</div>
    	</form>
    
    I'm not sure what to do :/. Thanks for your help though!
     
  6. Dally

    Dally Junior Member

    Joined:
    Dec 9, 2010
    Messages:
    151
    Likes Received:
    64
    Location:
    UK
    Bump! Can anybody help me out? I'll pay $5 to anyone who can get this sorted for me
     
  7. digoxin2012

    digoxin2012 Newbie

    Joined:
    Jan 24, 2012
    Messages:
    15
    Likes Received:
    0
    may be u can post at elance to find help