Creating new page template
Get Wordpress links
| WordPress Directories: | ||
|---|---|---|
| home_url() | Home URL | http://www.example.com |
| site_url() | Site directory URL | http://www.example.com or http://www.example.com/wordpress |
| admin_url() | Admin directory URL | http://www.example.com/wp-admin |
| includes_url() | Includes directory URL | http://www.example.com/wp-includes |
| content_url() | Content directory URL | http://www.example.com/wp-content |
| plugins_url() | Plugins directory URL | http://www.example.com/wp-content/plugins |
| theme_url() | Themes directory URL (#18302) | http://www.example.com/wp-content/themes |
| wp_upload_dir() | Upload directory URL (returns an array) | http://www.example.com/wp-content/uploads |
Creating More Menu
https://codex.wordpress.org/Navigation_Menus
Navigation Menus
. WordPress includes an easy to use mechanism for introducing customised navigation menus into a theme. In order to incorporate menu support into your theme, you need to add a few code segments to your theme files.
Function Reference
|
|
Contents
Register Menus
Firstly, in your theme's functions.php, you need to write a function to register the names of your menus. (This is how they will appear in the Appearance -> Menus admin screen.) As an example, this menu would appear in the "Theme Locations" box as "Header Menu".
function register_my_menu() {
register_nav_menu('header-menu',__( 'Header Menu' )); }
add_action( 'init', 'register_my_menu' );
And this would make two menu options appear, header menu and extra menu -
function register_my_menus() {
register_nav_menus( array(
'header-menu' => __( 'Header Menu' ),
'extra-menu' => __( 'Extra Menu' ) ) ); }
add_action( 'init', 'register_my_menus' );
Get specific Pages
https://codex.wordpress.org/Function_Reference/is_front_page
<?php } ?>
<?php is_front_page(); ?>
<?php if(is_front_page() || is_home() ) { ?><?php } ?>
Contact 7 page redirect url
put the code in
on_sent_ok: "location.replace('http://errorfound.in/significance/?page_id=9');"
on_sent_ok: "location.replace('http://errorfound.in/significance/?page_id=9');"
Nivo slider Defect
Warning : The permissions to the directory /home/username/sitename//wp-content/uploads/nivoslider4wp_files/ are invalid. Set them to 777 to be able to upload files.
First, the path is wrong on line 7 of file nivoslider4wp-panel.php. I changed it from:
$ns4wp_filesdir = ABSPATH.'/wp-content/uploads/nivoslider4wp_files/';
to:
$ns4wp_filesdir = ABSPATH.'wp-content/uploads/nivoslider4wp_files/';
Second, line 274 requires permissions 777 on the folder which is a MAJOR security issue. I changed it from:
<?php if (substr(decoct(fileperms($ns4wp_filesdir)),2) != '777') : ?>
to:
<?php if (substr(decoct(fileperms($ns4wp_filesdir)),2) < '755') : ?>
In my opinion these things need to be changed in the plugin core.
First, the path is wrong on line 7 of file nivoslider4wp-panel.php. I changed it from:
$ns4wp_filesdir = ABSPATH.'/wp-content/uploads/nivoslider4wp_files/';
to:
$ns4wp_filesdir = ABSPATH.'wp-content/uploads/nivoslider4wp_files/';
Second, line 274 requires permissions 777 on the folder which is a MAJOR security issue. I changed it from:
<?php if (substr(decoct(fileperms($ns4wp_filesdir)),2) != '777') : ?>
to:
<?php if (substr(decoct(fileperms($ns4wp_filesdir)),2) < '755') : ?>
In my opinion these things need to be changed in the plugin core.
Create Dynamic Sidebar
Paste this code where you want to show..
<?php // if ( dynamic_sidebar('sidebar-3') ) : else : endif; ?>
Paste this code in function.php
register_sidebar( array(
'name' => __( 'Secondary Widget Area', 'twentythirteen' ),
'id' => 'sidebar-2',
'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
<?php // if ( dynamic_sidebar('sidebar-3') ) : else : endif; ?>
Paste this code in function.php
register_sidebar( array(
'name' => __( 'Secondary Widget Area', 'twentythirteen' ),
'id' => 'sidebar-2',
'description' => __( 'Appears on posts and pages in the sidebar.', 'twentythirteen' ),
'before_widget' => '<aside id="%1$s" class="widget %2$s">',
'after_widget' => '</aside>',
'before_title' => '<h3 class="widget-title">',
'after_title' => '</h3>',
) );
Theme My Admin
FOR LOGIN PAGE
[theme-my-login default_action=login login_template=tml-login-form.php]
FOR REGISTER PAGE
[theme-my-login show_title=0 default_action=register register_template=tml-register-form.php]
FOR LOST PASSWORD PAGE
[theme-my-login show_title=0 default_action=lostpassword lostpassword_template=tml-lostpassword-form.php]
But now I'm not able to replicate this strategy for the profile page.
I've created a WP page for the themed profile and I've putted this shortcode in it's content:
[theme-my-login default_action=profile profile_template=tml-profile-form.php]
[theme-my-login default_action=login login_template=tml-login-form.php]
FOR REGISTER PAGE
[theme-my-login show_title=0 default_action=register register_template=tml-register-form.php]
FOR LOST PASSWORD PAGE
[theme-my-login show_title=0 default_action=lostpassword lostpassword_template=tml-lostpassword-form.php]
But now I'm not able to replicate this strategy for the profile page.
I've created a WP page for the themed profile and I've putted this shortcode in it's content:
[theme-my-login default_action=profile profile_template=tml-profile-form.php]
Woo Commerce Shortcode
[woocommerce_cart] – shows the cart page
[woocommerce_checkout] – shows the checkout page
[woocommerce_pay] – shows the checkout pay page
[woocommerce_thankyou] – shows the order received page
[woocommerce_order_tracking] – shows the order tracking form
[woocommerce_my_account] – shows the user account page
[woocommerce_edit_address] – shows the user account edit address page
[woocommerce_view_order] – shows the user account view order page
[woocommerce_change_password] – shows the change password page
[woocommerce_lost_password] – shows the lost password page
[woocommerce_logout] – shows the logout page
[woocommerce_checkout] – shows the checkout page
[woocommerce_pay] – shows the checkout pay page
[woocommerce_thankyou] – shows the order received page
[woocommerce_order_tracking] – shows the order tracking form
[woocommerce_my_account] – shows the user account page
[woocommerce_edit_address] – shows the user account edit address page
[woocommerce_view_order] – shows the user account view order page
[woocommerce_change_password] – shows the change password page
[woocommerce_lost_password] – shows the lost password page
[woocommerce_logout] – shows the logout page
open link in a new window
click on Screen Options (top right), and check the box labelled Link Target under the Show advanced menu properties heading.
Now select the appropriate target for your custom link.
Now select the appropriate target for your custom link.
No comments:
Post a Comment
Thank you for you feedback