This page is designed to allow various wordpress functions and other code to be tested
TESTING: Print out constants and other information
Referer and host (if set):
HTTP Referer not set. HTTP Host is: naeg.org.uk
SERVER_NAME: naeg.org.uk
Site URL: Function used is site_url()
= https://naeg.org.uk Tip: Use to avoid absolute paths.
Permalink of current page, using get_permalink() = https://naeg.org.uk/test/
Permalink of page with title "News" is https://naeg.org.uk/news/
Permalink of page with ID=218 is
Note: You need to know the Post ID! The best way to find this (in wp-admin) is view all posts or pages, and hover the mouse over the page you want. The ID is in the url you see at the bottom left.
Pagename (using var $pagename) is test
Path to wordpress directory using ABSPATH = /home/parrogor/naeg.org.uk/
Magic constants
File name ( __FILE__ ) = /home/parrogor/naeg.org.uk/wp-content/themes/twentytwelve-child/page_templates/bbtest.php Note this is always an absolute path
Directory ( __DIR__ ) = /home/parrogor/naeg.org.uk/wp-content/themes/twentytwelve-child/page_templates
Line number of file: ( __LINE__ ) = 47
Deriving information about a category
Category FAQS has 1 articles. Parent=Support ID=5
WP_Term Object ( [term_id] => 14 [name] => FAQS [slug] => faq [term_group] => 0 [term_taxonomy_id] => 14 [taxonomy] => category [description] => Advice for content creators. NOT UPDATED from old Joomla site [parent] => 5 [count] => 1 [filter] => raw [cat_ID] => 14 [category_count] => 1 [category_description] => Advice for content creators. NOT UPDATED from old Joomla site [cat_name] => FAQS [category_nicename] => faq [category_parent] => 5 )
TESTING JQUERY. Simple tests.
Now create a button (class=clickme) which changes the html caption to "You did it"
OK - I have to use function jQuery and not $! I get the message $ is not a function!
ACCESS DATABASE - LIST CATEGORIES
No session started
Query run. Number of rows returned = 10
ID | Name | Slug | Description | Parent | Count |
---|---|---|---|---|---|
1 | Uncategorized | uncategorized | 0 | 4 | |
2 | Projects | projects | The Parent for the categories used by sub-groups. Don't delete! Otherwise not used at present. On the old site this category included all articles for current projects. | 0 | 1 |
5 | Support | support | This category is not current used | 0 | 1 |
6 | Water Quality | water-quality | Working to further improve the water quality of the area including pressing for a long term solution to the management of Newport sewage wastes | 2 | 24 |
7 | Built Environment | built-environment | This sub-group looks at housing, housing improvements, renewable energy, planning and the Local Development Plan (LDP) | 2 | 24 |
8 | Natural Environment | natural-environment | This sub-group is aimed at encouraging Biodiversity and wildlife conservation. | 2 | 9 |
10 | News | news | News items | 0 | 26 |
14 | FAQS | faq | Advice for content creators. NOT UPDATED from old Joomla site | 5 | 1 |
15 | News Archive | news-archive | Old news items that are worth keeping. | 0 | 21 |
16 | Food Security | food-security | This sub-group’s remit includes protecting farm land from development, encouraging local produce, buy local, “dig for victory”, community farming, allotments etc. Also planning issues in support of these areas. | 2 | 3 |
Q:105 mS 0.1 25 Jul 20