Editing a PHP file to include a small text piece on every page

You should provide your code when asking this type of question. Here is an example of a header.php file. Look at the code and see how it’s done: <!DOCTYPE html> <html <?php language_attributes(); ?>> <head> <meta charset=”<?php bloginfo( ‘charset’ ); ?>” /> <title> <?php global $page, $paged; wp_title( ‘|’, true, ‘right’ ); bloginfo( ‘name’ ); … Read more

Problem with different query loops (and “main loop”) on category template page!

In order to provide more-specific help, we’ll need to know greater detail regarding exactly what’s happening that you don’t expect, or what’s not happening that you expect to happen, or what is happening differently from what you expect. That said, there are at least two things that will likely help you: Use descriptive and unique … Read more

Dynamic href link to Contact Page

If the contact page is identified solely by the associated template, you can query for a page with the template name in meta key _wp_page_template: $args = array( ‘post_type’ => ‘page’, ‘posts_per_page’ => 1, ‘meta_query’ => array( array( ‘key’ => ‘_wp_page_template’, ‘value’ => ‘contact_template.php’ ) ) ); $contact_page = new WP_Query( $args ); if( ! … Read more

Remove comment section from new page

If you want to be rid of comments on your site, one option is to remove the code from your theme files. You would need to search single.php, home.php, page.php, etc. within wp-content/themes/*your-active-theme* and find: <? php comments_template(); ?> Remove that and the comments section should disappear. NOTE: this change will be undone if you … Read more

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