adding script tag in head of specific pages

A simple google search can help you do this, well same question was answered before, you can see the answer here. Use WordPress methods in your functions.php to do this : function load_scripts() { global $post; wp_register_script( ‘home’, get_template_directory_uri() . ‘/js/home.js’, array(‘jquery’)); wp_register_script( ‘about’, get_template_directory_uri() . ‘/js/about.js’, array(‘jquery’)); wp_register_script( ‘somepost’, get_template_directory_uri() . ‘/js/somepost.js’, array(‘jquery’)); if( … Read more

Calling JavaScript for specific page irrespective of whichever theme you select

See wp_enqueue_script() for the information how to add scripts without editing the HTML. I assume the script is already registered or you’ll add all necessary parameters. Tied to the particular page ID: if( is_page($page_id) ) { // provide the page ID wp_enqueue_script(‘YOUR_SCRIPT_NAME’); //enqueue the script on success } Tied to the page slug: $slug = … Read more

video header in desktop view, image header in mobile view

First, add video header support on your theme. add_theme_support( ‘custom-header’, array( ‘video’ => true ) ); Next, add the_custom_header_markup(); on Header area where you want to show the image / video header. Finally, style your video header with some css like this. .wp-custom-header iframe, .wp-custom-header img, .wp-custom-header video { display: block; height: auto; width: 100%; … Read more

Put image onto header

First of all gain access to website files using FTP account, if you are not familiar with it, just google “FTP” and “FileZilla” and read some lines. Then go to /wp-content/themes/Twenty Seventeen/header.php insert the image html where you wish it to be

force download a file in template_redirect hook

The solution is in fact very simple. Just use the action admin_post_(action)… add_action( ‘admin_post_export_page’, ‘export_page’ ); function export_page() { // any code you want } than you can make custom links admin_url( ‘admin-post.php?action=export_page&id=’ . $post->ID ); Thanks Milo for giving the solution.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)