Reputation: 4380
I'm a newbie at WordPress PHP.
I'm looking in the header.php file and it's calling:
<?php suffusion_before_page(); ?>
For this function and any other function in WordPress/PHP how do I find which file that function is being defined?
Upvotes: 2
Views: 2181
Reputation: 1538
If you are using Windows OS, then you can use GrepWin. Check the screenshots how to use this:
Selecting folder to search by grepwin:
Using search string in the textbox to search:
Upvotes: 1
Reputation: 1677
If you use Windows you can enter something like this to command prompt:
find /c /i "function suffusion_before_page(" C:\path\to\wordpress\folder\*.* | find ": 0" /v
Change the path, of course.
Upvotes: 0
Reputation: 303
Look in your hosting cPanel site under your site directory with the rest of your files for your site. The file name is suffusion_before_page.php, which is what you should look for.
You can try and go to www.yoursite.com/wp-admin/theme-editor.php, and then control + f to bring up the search function in browser. Type in "suffusion_before_page.php", then click that file and you can see it.
Upvotes: 0
Reputation: 6976
If you have SSH access to the server you can use grep to find the function definition.
grep -R 'function suffusion_before_page' /path/to/theme
If you don't you can download the theme files and search for it using a program of your choice. Notepad++ has a find in files feature.
Upvotes: 1