fbpx

Custom Post Type Search Bar

Just in case anyone is looking for a way to create a search form that provides selectable drop-down list of their custom post types, here is what worked for me:

<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
	<input type="text" name="s" id="s" value="Enter keywords ..." 
        onfocus="if(this.value==this.defaultValue)this.value='';" 
        onblur="if(this.value=='')this.value=this.defaultValue;"/><br />
	<select name="post_type">
		<option value="">Choose Category:</option>
		<option value="">All Categories</option>
		<option value="post_type_a">Post Type A</option>
		<option value="post_type_b">Post Type B</option>
		 <option value="post_type_c">Post Type C</option>
	</select><br />
	<input type="submit" id="searchsubmit" value="Search Help" />
</form>

Plugin: Custom Currency on Gravity Forms

This code should be placed in the functions.php file of your active theme.

add_filter( 'gform_currencies', 'update_currency' );
function update_currency( $currencies ) {
    $currencies['EUR'] = array(
        'name'               => __( 'Euro', 'gravityforms' ),
        'symbol_left'        => '€',
        'symbol_right'       => '',
        'symbol_padding'     => ' ',
        'thousand_separator' => ',',
        'decimal_separator'  => '.',
        'decimals'           => 2
    );

    return $currencies;
}

Source: https://www.gravityhelp.com/documentation/article/gform_currencies/

Server: IonCube Loader Manual Installation

Step 1
Download and save the Linux (x86) ionCube Loader in zip format from the ionCube site to the Desktop of your own computer.
Step 2
Uncompress the .zip file by right-clicking the file and selecting Extract All.
Step 3
After extraction, you should be left with an ioncube folder. We will upload this folder later. Continue with the next steps.
Step 4
Launch a basic text editor such as Notepad and copy and paste the code below into it:

<?php phpinfo(); ?>
Step 5
Using an FTP program, upload only the phpinfo.php file to the folder that contains the ionCube PHP Encoded files.

Please reference our FTP section of the 1&1 Help Center for more help if necessary.

Step 6
Next, access the phpinfo.php page from the browser on your computer (such as Mozilla Firefox) using a URL that points to the folder containing your ionCube PHP Encoded files and the phpinfo.php page. http://s123456789.onlinehome.us/phpinfo.php
Step 7
First check the version of PHP being used at the top of the screen. Write down the version on a piece of paper.
Step 8
Now, scroll down the page until you see the Environment heading. Highlight the value ofDOCUMENT_ROOT.
Step 9
Open your text editor again to create a new text document and copy and paste theDOCUMENT_ROOT value into it.
Step 10
Now add the text /ioncube/ioncube_loader_lin_4.4.so to the end of the line. You may need to replace the version number to match the version of PHP you are running. For instance, if the version of PHP you are using is 5.2.13, you would change the text to 5.2.
Step 11
At the beginning of the line, add the text zend_extension=
Step 12
Save the file to your desktop as php.ini
Step 13
Using an FTP program…

  • Upload the php.ini file to the folder than contains your ionCube PHP Encoded files and phpinfo.php page.
  • Upload the ioncube/ folder to the root of your webspace. Do not upload the ioncube/folder to a subfolder in your webspace.
Step 14
Access the phpinfo.php page again and you should now see that the ionCube Loader has been installed as is recognized by PHP.
Step 15
Since the settings defined in the php.ini file only apply to the folder where it is saved (which should be the same folder as your ionCube encoded files and phpinfo.php page), it is now necessary to upload the php.ini file to any additional subfolders that contain files which require the ionCube Loader.

Plugin: Add new user roles

Members Plugin

Plugin Features

  • Role Manager: Allows you to edit, create, and delete roles as well as capabilities for these roles.
  • Multiple User Roles: Give one, two, or even more roles to any user.
  • Explicitly Deny Capabilities: Deny specific caps to specific user roles.
  • Clone Roles: Build a new role by cloning an existing role.
  • Content Permissions: Gives you control over which users (by role) have access to post content.
  • Shortcodes: Shortcodes to control who has access to content.
  • Widgets: A login form widget and users widget to show in your theme’s sidebars.
  • Private Site: You can make your site and its feed completely private if you want.
  • Plugin Integration: Members is highly recommended by other WordPress developers. Many existing plugins integrate their custom roles and caps directly into it.