WordPress Fatal error: Call to undefined get_header() in index.php on line 15 [closed]

Something went wrong with your installation. As commented by @Sumit get_header() is a core function and cannot be undefined. To troubleshoot: Reinstall WordPress and enable WP_DEBUG in wp_config.php: define( ‘WP_DEBUG’, true ); If it is on a live site you might want to use this instead: define( ‘WP_DEBUG_LOG’, true ); define( ‘WP_DEBUG_DISPLAY’, false ); This … Read more

Why I can’t add a script-code into theme-settings without 403-forbidden?

Solution: Because the theme JavaScript is not in: /js/sticky-menu.js Rather, it’s in your theme folder (as your theme name is lifestyle-pro, as found from your site’s HTML): /wp-content/themes/lifestyle-pro/js/sticky-menu.js So your <script> CODE should be: <script data-cfasync=”false” src=”https://wordpress.stackexchange.com/wp-content/themes/lifestyle-pro/js/sticky-menu.js”></script> Bonus: This can be made better with the use of the WordPress function get_stylesheet_directory_uri(). In that case, your … Read more

What code do you use to generate the text to go into the HTML title tag?

Mine is: function getDocumentTitle($separator = ” &laquo; “){ $title = get_bloginfo(‘name’); $desc = get_bloginfo(‘description’); if(is_front_page() && is_home() && !empty($desc)){ $title .= $separator.$desc; }elseif(is_home() || is_singular()){ $id = $GLOBALS[‘wp_query’]->get_queried_object_id(); if($meta = get_post_meta($id, ‘title’, true)) $title .= $separator.$meta; $title .= (empty($meta) && is_front_page() && !empty($desc)) ? $separator.$desc : $separator.get_post_field(‘post_title’, $id); }elseif(is_archive()){ if(is_category() || is_tag() || is_tax()){ $term … Read more

Add social icons in a theme through custom admin menu

I did something similar on my site a while back. I’m sure you can tweak it to fit your needs. Under each article I have an author box with social media icons that link to their accounts. In content-single.php <?php if ( get_the_author_meta(‘twitter’) ) : ?> <a href=”http://www.twitter.com/<?php the_author_meta(‘twitter’); ?>” title=”Twitter”><img src=”<?php bloginfo( ‘url’ ) … Read more

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