Category Wordpress
Create Auth URL
1 2 3 4 |
function add_last_nav_item($items) { return $items .= '<li><a href="#myModal" role="button" data-toggle="modal">Contact</a></li>'; } add_filter('wp_nav_menu_items','add_last_nav_item'); |
1 2 3 4 5 6 7 8 9 |
add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $icon_url, $position ); |
using icon url
1 2 3 4 5 6 7 8 9 10 |
$url = plugin_dir_url( __FILE__ ); add_menu_page( $page_title, $menu_title, $capability, $menu_slug, $function, $url."icon... |
1 2 3 4 5 6 7 |
function functionname(){ $results = ''; // your data echo json_encode($results); die(); } add_action('wp_ajax_functionname', 'functionname'); add_action('wp_ajax_nopriv_functionname', 'functionname'); |
1 2 3 4 5 6 7 |
UPDATE wp_options SET option_value = replace(option_value, 'http://www.oldurl', 'http://www.newurl') WHERE option_name = 'home' OR option_name = 'siteurl'; UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl'); UPDATE wp_posts SET post_content = replace( |
You can do this by adding the following code in your .htaccess file:
1 2 3 4 5 |
<IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{SERVER_PORT} 80 RewriteRule ^(.*)$ https://www.yoursite.com/$1 [R,L] </IfModule> |
Don’t forget to replace yoursite.com with your site URL.
If you are on nginx servers (most users are not), you would add the following to redirect from HTTP to HTTPS:
1 2 3 4 5 |
server { l... |