TEST PAGE - display wordpress contstants etc.

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

IDNameSlugDescriptionParentCount
1Uncategorizeduncategorized03
2ProjectsprojectsThe 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.00
5SupportsupportThis category is not current used00
6Water Qualitywater-qualityWorking to further improve the water quality of the area including pressing for a long term solution to the management of Newport sewage wastes222
7Built Environmentbuilt-environmentThis sub-group looks at housing, housing improvements, renewable energy, planning and the Local Development Plan (LDP)223
8Natural Environmentnatural-environmentThis sub-group is aimed at encouraging Biodiversity and wildlife conservation.25
10NewsnewsNews items019
14FAQSfaqAdvice for content creators. NOT UPDATED from old Joomla site51
15News Archivenews-archiveOld news items that are worth keeping.021
16Food Securityfood-securityThis 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.22

Q:24 mS   0.1 25 Jul 20