pages match book order
This commit is contained in:
@@ -42,7 +42,15 @@ function ddd($variable)
|
||||
// Get An Array of Top Level Pages and their Subpages
|
||||
function get_pages_as_array()
|
||||
{
|
||||
$pages = get_pages();
|
||||
|
||||
$args = [
|
||||
'sort_order' => 'ASC',
|
||||
'sort_column' => 'menu_order',
|
||||
'hierarchical' => 1,
|
||||
'exclude' => []
|
||||
];
|
||||
|
||||
$pages = get_pages($args);
|
||||
$page_hierarchy = array();
|
||||
|
||||
foreach ($pages as $page) {
|
||||
|
@@ -2,23 +2,6 @@
|
||||
|
||||
$menuData = [
|
||||
|
||||
// Daily Living and Housing
|
||||
[
|
||||
'slug' => 'daily-living-and-housing',
|
||||
'title' => 'Daily Living and Housing',
|
||||
'description' => 'Tips for independent living, housing options, and creating a comfortable daily routine.',
|
||||
'subcategories' => [
|
||||
['title' => 'Before Signing The Lease', 'slug' => 'before-signing-the-lease', 'description' => ''],
|
||||
['title' => 'Finding A Place To Stay', 'slug' => 'finding-a-place-to-stay', 'description' => ''],
|
||||
['title' => 'First Time Renting FAQs', 'slug' => 'first-time-renting-faqs', 'description' => ''],
|
||||
['title' => 'House vs. Apartment', 'slug' => 'house-vs-apartment', 'description' => ''],
|
||||
['title' => 'Off Campus Housing', 'slug' => 'off-campus-housing', 'description' => ''],
|
||||
['title' => 'Students With Children', 'slug' => 'students-with-children', 'description' => ''],
|
||||
['title' => 'Transportation', 'slug' => 'transportation', 'description' => ''],
|
||||
],
|
||||
'bootstrap_icon' => 'bi-building',
|
||||
],
|
||||
|
||||
// Goals and Objectives
|
||||
[
|
||||
'slug' => 'goals-and-objectives',
|
||||
@@ -33,6 +16,22 @@ $menuData = [
|
||||
'bootstrap_icon' => 'bi-bullseye',
|
||||
],
|
||||
|
||||
// Preparing for College or University
|
||||
[
|
||||
'slug' => 'preparing-for-college-and-university',
|
||||
'title' => 'Preparing for College and University',
|
||||
'description' => 'Navigate academia successfully with insights on admissions, majors, and preparation.',
|
||||
'subcategories' => [
|
||||
['title' => 'Applying to Post Secondary', 'slug' => 'applying-to-post-secondary', 'description' => ''],
|
||||
['title' => 'Education Level Differences', 'slug' => 'education-level-differences', 'description' => ''],
|
||||
['title' => 'Online Learning and Remote Work', 'slug' => 'online-learning-and-remote-work', 'description' => ''],
|
||||
['title' => 'Strategies For Success', 'slug' => 'strategies-for-success', 'description' => ''],
|
||||
['title' => 'Support and Accommodations', 'slug' => 'support-and-accommodations', 'description' => ''],
|
||||
],
|
||||
'bootstrap_icon' => 'bi-journal-bookmark-fill',
|
||||
],
|
||||
|
||||
|
||||
// Managing Your Finances
|
||||
[
|
||||
'slug' => 'managing-your-finances',
|
||||
@@ -50,6 +49,23 @@ $menuData = [
|
||||
'bootstrap_icon' => 'bi-cash-coin',
|
||||
],
|
||||
|
||||
// Daily Living and Housing
|
||||
[
|
||||
'slug' => 'daily-living-and-housing',
|
||||
'title' => 'Daily Living and Housing',
|
||||
'description' => 'Tips for independent living, housing options, and creating a comfortable daily routine.',
|
||||
'subcategories' => [
|
||||
['title' => 'Before Signing The Lease', 'slug' => 'before-signing-the-lease', 'description' => ''],
|
||||
['title' => 'Finding A Place To Stay', 'slug' => 'finding-a-place-to-stay', 'description' => ''],
|
||||
['title' => 'First Time Renting FAQs', 'slug' => 'first-time-renting-faqs', 'description' => ''],
|
||||
['title' => 'House vs. Apartment', 'slug' => 'house-vs-apartment', 'description' => ''],
|
||||
['title' => 'Off Campus Housing', 'slug' => 'off-campus-housing', 'description' => ''],
|
||||
['title' => 'Students With Children', 'slug' => 'students-with-children', 'description' => ''],
|
||||
['title' => 'Transportation', 'slug' => 'transportation', 'description' => ''],
|
||||
],
|
||||
'bootstrap_icon' => 'bi-building',
|
||||
],
|
||||
|
||||
// Mental Health and Wellness
|
||||
[
|
||||
'slug' => 'mental-health-and-wellness',
|
||||
@@ -59,9 +75,11 @@ $menuData = [
|
||||
['title' => 'Gender Identity and Sexual Orientation', 'slug' => 'gender-identity-and-sexual-orientation', 'description' => ''],
|
||||
['title' => 'Living In Balance', 'slug' => 'living-in-balance', 'description' => ''],
|
||||
['title' => 'Making Healthy Choices', 'slug' => 'making-healthy-choices', 'description' => ''],
|
||||
['title' => 'Managing Stress', 'slug' => 'managing-stress', 'description' => ''
|
||||
[
|
||||
'title' => 'Managing Stress', 'slug' => 'managing-stress', 'description' => ''
|
||||
],
|
||||
['title' => 'Physical Health', 'slug' => 'physical-health', 'description' => ''
|
||||
[
|
||||
'title' => 'Physical Health', 'slug' => 'physical-health', 'description' => ''
|
||||
],
|
||||
['title' => 'Safety', 'slug' => 'safety', 'description' => ''],
|
||||
['title' => 'Sexual Health', 'slug' => 'sexual-health', 'description' => ''],
|
||||
@@ -70,20 +88,6 @@ $menuData = [
|
||||
'bootstrap_icon' => 'bi-heart-pulse-fill',
|
||||
],
|
||||
|
||||
// Preparing for College or University
|
||||
[
|
||||
'slug' => 'preparing-for-college-and-university',
|
||||
'title' => 'Preparing for College and University',
|
||||
'description' => 'Navigate academia successfully with insights on admissions, majors, and preparation.',
|
||||
'subcategories' => [
|
||||
['title' => 'Applying to Post Secondary', 'slug' => 'applying-to-post-secondary', 'description' => ''],
|
||||
['title' => 'Education Level Differences', 'slug' => 'education-level-differences', 'description' => ''],
|
||||
['title' => 'Online Learning and Remote Work', 'slug' => 'online-learning-and-remote-work', 'description' => ''],
|
||||
['title' => 'Strategies For Success', 'slug' => 'strategies-for-success', 'description' => ''],
|
||||
['title' => 'Support and Accommodations', 'slug' => 'support-and-accommodations', 'description' => ''],
|
||||
],
|
||||
'bootstrap_icon' => 'bi-journal-bookmark-fill',
|
||||
],
|
||||
|
||||
// Forms and Additional Information
|
||||
[
|
||||
|
@@ -1,35 +0,0 @@
|
||||
<?php
|
||||
|
||||
function open_graph_twitter_card()
|
||||
{
|
||||
// Get the post or page ID
|
||||
$post_id = get_the_ID();
|
||||
|
||||
// Get the post or page title
|
||||
$title = get_the_title($post_id);
|
||||
|
||||
// Get the post or page excerpt (description)
|
||||
$description = (get_the_excerpt()) ? get_the_excerpt() : get_bloginfo('description');
|
||||
|
||||
// Get the post or page URL
|
||||
$url = get_permalink($post_id);
|
||||
|
||||
// Set default image url
|
||||
$default_image_url = get_theme_file_uri('/screenshot.png');
|
||||
|
||||
// Get the post thumbnail (featured image) URL
|
||||
$thumbnail = get_the_post_thumbnail_url($post_id);
|
||||
?>
|
||||
<!-- Open Graph meta tags -->
|
||||
<meta property="og:title" content="<?php echo $title . ' - ' . get_bloginfo('name'); ?>" />
|
||||
<meta property="og:description" content="<?php echo $description ?>" />
|
||||
<meta property="og:url" content="<?php echo $url ?>" />
|
||||
<meta property="og:image" content="<?php echo $default_image_url ?>" />
|
||||
<!-- Twitter Card meta tags -->
|
||||
<meta name="twitter:card" content="summary" />
|
||||
<meta name="twitter:title" content="<?php echo $title . ' - ' . get_bloginfo('name'); ?>" />
|
||||
<meta name="twitter:description" content="<?php echo $description ?>" />
|
||||
<meta name="twitter:image" content="<?php echo $default_image_url ?>" />
|
||||
<?php
|
||||
|
||||
}
|
Reference in New Issue
Block a user