Articles of wp blog header.php

WordPress Website with Login system

I am new to WordPress but have been developing in PHP (CI specially). I stumbled into problem when I have to integrate a website developed in CI with a WordPress website. This wordpress component is another website that is extension of current site (You know Clients make you do weird stuffs at times!) . The […]

What is the function of wp() in wp-blog-header.php

I am learning WordPress and I find that in wp-blog-header.php a function wp(); is defined. I find that it is defined in functions.php. Could someone tell me what exactly this function do. The Codex always look Greek or Latin to me.

Fatal error: Call to undefined function get_post() with ajax

I have an index.php page with about link, which will get about author content from created page (post) inside WordPress dashboard with name about. I’m using Magnific Popup plugin for poups. I have about.php which includes content of about page like this: <?php $pageid = 2; // 2 is the id of about page/post $about […]

WordPress archives in header -necessary?

I just had a look at my source code and found that at the very beginning there’s this really long list of archives. I haven’t seen this on other blogs: <link rel=”pingback” href=”” /> <link rel=’archives’ title=’May 2015′ href=’’ /> <link rel=’archives’ title=’April 2015′ href=’’ /> (…. lots more …) <link rel=’archives’ title=’November 2011′ href=’’ […]

How to load wordpress environment without loading the template?

Basically I want to use wordpress functions for example wp_create_user() or wp_update_user() outside of wordpress (outside of wordpress directory). I tried with all the below code snippets to load the wordpress environment, I am able to use the functions correctly in both the cases but the problem is that this also loads the wordpress template […]

Right way to include blog-header.php?

I have a voting system on a custom post which uses AJAX, and I have a file that handles the AJAX request. This file is inside a sub folder named php of my theme. Hence the structure is: ../wp-content/themes/my-theme/php/ajax-handler.php I use the following line to include the blog-header.php file: include(‘../../../../wp-blog-header.php’); This works fine, but with […]

Why I have this error when I try to install this old blog on my local webserver?

I am pretty new to WP (I came from Joomla) and I am finding some difficulties trying to put on my local web server an old backup of a website (made using WP 3.5) I have performed the following operation: 1) I have put the website backup into a directory named blog into my Apache […]

Using WPDB to output raw XML fails because of wp-blog-header.php

I’m coding a plugin. One particular file of this plugin is supposed to pull data from the plugin’s custom DB table, and output it with minimal processing as raw XML. The problem is, to get the WPDB class to work when the file was opened directly, I had to add a require to wp-blog-header.php. This […]

include wp-blog-header not working on MAMP

To clarify my question… My plugin is/was using AJAX to call the file pluginname/submit/pick.php My pluginname/pluginname.php contains the usual plugin header and wordpress automatically finds it. Original Question… I’m trying to use the global $wpdb in a plugin to insert data into one of my tables. From the docs it sounds like I just need […]

Downsize CPU & DB usage in wordpress

i have created a smart interface WP based which we use to manage clients.. it uses a lot of information and data each time a client is returned / viewed. it is a locked interface and does not have traffic spikes in the past month i have seen major memory and CPU usage spikes so, […]