Skip to content

Instantly share code, notes, and snippets.

@VivekSaha
VivekSaha / Custom Registration Form
Last active October 11, 2021 14:38
Custom Registration Form
<?php
/*
* Template Name: Custom Registration
*/
get_header();
?>
<?php
global $wpdb;
@VivekSaha
VivekSaha / Customize Login Page
Last active October 11, 2021 13:00
Customize Login Page
<?php
/*
* Template Name: Login
*/
?>
<?php
global $user_ID;
global $wpdb;
@VivekSaha
VivekSaha / Customize Existing WP Login Form
Created October 11, 2021 12:38
Customize Existing WP Login Form
function mycustom_logo(){
//code to change logo
$logo_style = '<style type="text/css">';
$logo_style .= "h1 a {background-image:url('".get_template_directory_uri()."/assets/images/Reading.JPG') !important;}";
$logo_style .= "</style>";
echo $logo_style;
}
add_action("login_head","mycustom_logo");
function mycustom_link(){
@VivekSaha
VivekSaha / Custom Widget Register
Created October 11, 2021 11:03
Custom Widget Register
if(!class_exists("myCustomWidget")){
class myCustomWidget extends WP_Widget{
public function __construct(){
parent::WP_Widget(false, "My Custom Widget");
}
public function form($instance){
if(!empty($instance)){
$title = $instance['title'];
$description = $instance['description'];
@VivekSaha
VivekSaha / Custom Theme Option Using Setting API
Created October 10, 2021 10:33
Custom Theme Option Using Setting API
add_action("admin_menu","mythemeoptions");
function mythemeoptions(){
add_menu_page(
"theme-options", //page title
"Footer Options", //menu title
"manage_options", //capability
"theme-options", //menu slug
"mycustom_options", //call back function
"dashicons-admin-post" //icon
);
@VivekSaha
VivekSaha / Custom Theme Panel in appreance customize
Created October 10, 2021 10:31
Custom Theme Panel in appreance customize
//custom theme panel
function custom_theme_panel_setting($wp_customize){
$wp_customize->add_section("custom_theme_section_area",array(
"title"=>"Custom Theme Settions"
));
//Title
$wp_customize->add_setting("custom_theme_title_setting",array(
"default"=>"Test Kumar"
));
$wp_customize->add_control("custom_theme_title_control",array(
<script>
$(function(){
$('#input_1_13').usPhoneFormat({
format: '(xxx) xxx-xxxx'
});
$('#input_1_14').usPhoneFormat({
format: '(xxx) xxx-xxxx'
});
<?php
function myTheme_Support(){
//Title (auto added when wp_head() is added)
add_theme_support('title-tag');
//Logo (the_custom_logo())
add_theme_support( 'custom-logo', array(
'height' => 100,
'width' => 400,
'flex-height' => true,
'flex-width' => true,
/* http://prismjs.com/download.html?themes=prism-okaidia&languages=markup+css+clike+javascript+php+sass+scss */
var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-(\w+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,util:{encode:function(e){return e instanceof a?new a(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/\u00a0/g," ")},type:function(e){return Object.prototype.toString.call(e).match(/\[object (\w+)\]/)[1]},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++t}),e.__id},clone:function(e){var t=n.util.type(e);switch(t){case"Object":var a={};for(var r in e)e.hasOwnProperty(r)&&(a[r]=n.util.clone(e[r]));return a;case"Array":return e.map(function(e){return n.util.clone(e)})}return e}},languages:{extend:function(e,t){var a=n.util.clone(n.languages[e]);for(var r in t)
<?php
require_once("../../../wp-load.php");
if(isset($_POST['submit'])){
$lp_loan_type_value = $_POST['lp_loan_type_value'];
$lp_property_type_value = $_POST['lp_property_type_value'];
$lp_zipcode = $_POST['lp_zipcode'];
$lp_credit_type_value = $_POST['lp_credit_type_value'];