Cant remove line that appears above page content

You’re missing part of your post <div> Look through your loop and you’ll see something that’s not closed or something. It will more than likely look like this <?php the_ID(); ?>” <?php post_class(); ?>> When it needs to be something like <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>> Hope that helps.

How to make text show up – new page template

Your template must have the the_content() function called within the WordPress loop to show up the text you’ve entered while creating new post. You might have missed the the_content() function in your custom template, that function retrieves and show the content of your page. Here is sample usage <?php get_header(); ?> <div> <?php if (have_posts()) … Read more

Register/Get sidebar?

http://codex.wordpress.org/Function_Reference/get_sidebar <?php get_sidebar(‘other’); ?> for instance will call the template sidebar-other.php you would add the dynamic_sidebar() code in that sidebar-other.php template; see also http://codex.wordpress.org/Widgetizing_Themes

Only show content if current page is NOT one of 2 page templates [closed]

If you want don’t want to show content if the current template is template-custom.php or template-custom2.php you can use: if (!is_page_template(‘template-custom.php’) && !is_page_template(‘template-custom2.php’)) { <!– show some content when you AREN NOT in template-custom.php NOR template-custom2.php –> } or if (is_page_template(‘template-custom.php’) || is_page_template(‘template-custom2.php’)) { <!– show some content when you ARE in template-custom.php OR template-custom2.php … Read more

How to check if a specific page uses a page template?

Page template is set in a post meta field keyed ‘_wp_page_template’ so, instead of using raw $wpdb query, you can run a WP_Query using ‘author’ argument and meta_query to retrieve pages from a specific author that also have a specific templates: $q = new WP_Query( array( ‘author’ => $user->ID, ‘post_type’ => ‘page’, ‘meta_query’ => array( … Read more

Create a page template with No Footer

The correct way to load footer-none.php is: get_footer(“none”); Anyway, I think it can be better to use wp_footer() (required function on any frontend page) directly in the page template file so you don’t need to load any empty footer template (assuming you load all required HTML tags in the page template, for example closing body … Read more

Find the page template of the previous page

You can use wp_get_referer(); to get a URL of previous page from where user came. Then get the last slug part of the URL. Then compare if the slug matches with slug of your custom search-result page template. Then you can decide whether to show or not to show ‘Back to search results’ link. Please … Read more

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