Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [wp-blog-header.php]

Loads the WordPress environment and template.

0
votes
2answers
39 views

How to run a function after wp() in the wp-blog-header.php file?

I want to run a function after the wp(); line in the file wp-blog-header.php, what is the proper hook to use here? <?php /** * Loads the WordPress environment and template. * * @package ...
1
vote
1answer
41 views

how to add H1 in title site?

based on SEO inspector said that my homepage doesnt cointain H1 heading... this code from developer source i taken from mozilla browser <title>interiordapur - Ahlinya Kitchen Set &amp; ...
0
votes
1answer
19 views

My first web wp-blog-header.phd

This is my first time making af webside and I have by an accident deleted somthing in/ at my File manager. (I thougth it was the blog part that i do not need ) but Now the webside is white and it ...
0
votes
3answers
34 views

How to select a specific page

I'm having an issue selecting a page. There are guides that tell you how to find the page ID and I just couldn't find it in the admin panel to figure out what the page ID is. If only there was a way ...
0
votes
1answer
137 views

Plugin alternative to wp-blog-header.php hacks?

I have 2 extra pieces of code in wp-blog-header.php. The first handles 410 and 404 headers and goes at the top, before the line if ( !isset($wp_did_header) ) { The second handles some complex ...
0
votes
1answer
14 views

my header.php page got erased when i trying to post google tag manger code , how can i retrieve it, rest of the theme is ok

When i was trying to paste my google tag code into header.php page , the entire page got erased, how can i retrive it. I am able to the see the sliders in the header area , but the header page is ...
0
votes
1answer
52 views

Add custom field information to source meta data

I try to add information from a custom field into the metadata in the source code. While searching for the solutions I found some. As I am not really an expert I ask you guys. I want to add ...
0
votes
0answers
326 views

How to call WordPress PHP file using external js file

I have added custom PHP file in WordPress directory and added following line to use WordPress functions: require ('../wp-blog-header.php'); Now I am able to use WordPress functions but unable call ...
0
votes
1answer
21 views

Blog page is not showing properly

I am working on my site http://coregroupus.com/blog/ due to some problem my blog page is not displaying posts properly. Its showing the content of some other page in header, however all the posts are ...
-1
votes
1answer
35 views

Is it ok if I use this <title> tag?

I'm using <title><?php echo get_bloginfo('title'); ?></title> but it shows the same title in all pages. Is it any way to show the title post, the separator and the blog name in the ...
0
votes
2answers
604 views

Body tag in header AND template/footer?

So I'm pretty new at Wordpress development, and I'm a little confused by one thing. After going through and finishing my navigation in my header.php file, I went over to my template for the home page ...
0
votes
1answer
67 views

How to extract some part of WordPress full source code

Is it possible to extract some part of WordPress like the posting and display of content. In the posting part all the processes used in posting and updating a content or the posts. Ihe index ...
0
votes
1answer
321 views

Allow the execution of an external PHP script for logged users

I need to call a PHP script external to WP and I would like to take advantage of the credentials of WP so that only logged users can access this script. I have tried to use this code embedded in my ...
0
votes
1answer
306 views

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="http://...
0
votes
1answer
735 views

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 ...
1
vote
1answer
6k views

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 ...
0
votes
0answers
244 views

Could not find wp-load.php issue

I am setting up a Wordpress site into a Git repository, and as a result have moved the wp-content directory outsite of the Wordpress core directory (which is permitted as per http://codex.wordpress....
0
votes
0answers
249 views

why get_header doesn't work twice in a test

I'm trying to test a template. It's working fine individually until I run all the tests altogether and the tests fail. protected function load_template() { do_action( 'template_redirect' ); $...
0
votes
1answer
530 views

Get permalink of a post without using Wordpress functions

I'm trying to get the permalink of a post without using Wordpress functions and am trying to find the best way to go about it. Basically whats happening is that I have a multi site install of ...
0
votes
1answer
108 views

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 ...
2
votes
1answer
523 views

there's a way to include a minimal WP for check only the current user, its roles (caps?) and then release/free it?

I need to count how many times a file in a particular sub-directory is downloaded and track who downloaded it. I'm using a Php file to do it, it isn't a WP file but I need to include WP to get the ...
1
vote
2answers
454 views

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 ...
0
votes
0answers
699 views

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 ...
0
votes
4answers
6k views

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 ...
2
votes
2answers
2k views

Using wordpress and codeigniter in one website

Is it possible to use WordPress as the CMS but all of contents will be displayed using CodeIgniter? What I want to know also if I can use the WordPress functions by simply including this wp-blog-...
2
votes
1answer
1k views

Force pdf download not working when include blog-header.php

I have this code which works in a file called downloads/download.php: <?php header('Content-type: application/octet-stream'); header('Content-Disposition: attachment; filename="file.pdf"'); ...
0
votes
1answer
394 views

Cannot Modify Header Information - While trying logging in

I am having the same issue as cited on: https://wordpress.stackexchange.com/questions/80276/cannot-modify-header-information-headers-already-sent-theme-specific-functi Can you give me a help on that. ...
0
votes
4answers
3k views

Include root files into header files

I want to include files from the root directory of my site within the WordPress "header" file. Is there any function for including a file from the root folder?
2
votes
4answers
2k views

Using plugin functionality in external php script not working

I am encountering a strange problem which I couldn't solve so far. I'm calling a .php script via cronjob (Debian/GNU Linux). To use wordpress functionailty I added: define('WP_USE_THEMES', false); ...
3
votes
4answers
5k views

Creating a Dynamic Path to wp-blog-header.php

Created a class in an external script which is dependent on the Wordpress environment. Since it's a class I intend to use on various projects, I decided to dynamically create a path to wp-blog-header....
1
vote
1answer
165 views

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 ...
1
vote
2answers
1k views

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. ...
56
votes
5answers
77k views

What is the correct way to use WordPress functions outside WordPress files?

I read about 2 methods for initializing WordPress function outside of WordPress files so We can use these functions on any page or website outside the WordPress blog. Which one of these 2 methods is ...
0
votes
1answer
2k views

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-...
2
votes
1answer
116 views

Limiting conditional comment to home only in header.php

I've discovered a solution to an IE problem with a conditional comment. I only need it on the home page because I've isolated there with a class on only one image. Unfortunately, the comment causes me ...
0
votes
1answer
1k views

Loading wp-load.php in an external PHP file throws unknown error

I'm loading wp-load.php in order to access WP functions inside of a PHP file that I'm using to process form submissions. Everything works perfectly fine on localhost and every server I've tested (...