How to create a wordpress template without using any page

You may use template_redirect action: add_action( ‘template_redirect’, ‘wpse131387_template_redirect’ ); function wpse131387_template_redirect( ){ if ($_SERVER[‘REQUEST_URI’] == ‘/some-template’) { global $wp_query; $wp_query->is_404 = false; status_header(200); include(dirname(__FILE__) . ‘/some-template.php’); exit(); } }

Change path of the page’s template

You can place the page templates wherever you want (also in a separate folder) as long as the files are within the current or parent theme’s directory. UPDATE: Follow this link to get a more detailed information about the Template File Folders: http://codex.wordpress.org/Page_Templates#File_Folders Take also a closer look at the Page Templates and the default … Read more

Disable WP Editor for specific page templates

Yes, try this : function remove_editor() { if (isset($_GET[‘post’])) { $id = $_GET[‘post’]; $template = get_post_meta($id, ‘_wp_page_template’, true); switch ($template) { case ‘template_01.php’: case ‘template_02.php’: case ‘template_03.php’: case ‘template_04.php’: // the below removes ‘editor’ support for ‘pages’ // if you want to remove for posts or custom post types as well // add this line … Read more

page template for attachement page?

WordPress supports several types of attachment templates. The function get_attachment_template in wp-includes/theme.php provides this support; it is called in wp-includes/template-redirect.php. If your theme includes attachment.php all of your attachments will be rendered with that template. If your theme also includes image.php then all of your images will use that template as long as they have … Read more

Next & Previous (Pagination in this case) Not Appearing

<?php /* Template Name: Portfolio */ ?> <?php get_header(); ?> <div id=”full_container”> <div id=”portfolio_content”> <div id=”portfolio_wrap”> <div id=”content”> <?php $loop = new WP_Query(array(‘post_type’ => ‘portfolio’, ‘posts_per_page’ => 2)); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php $custom = get_post_custom($post->ID); $screenshot_url = $custom[“screenshot_url”][0]; $website_url = $custom[“website_url”][0]; ?> <a href=”https://wordpress.stackexchange.com/questions/30616/<?php the_permalink() ?>”> <span class=”img”> <?php … Read more

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