Skip to content

Commit

Permalink
AJAX News & Blogs filtering complete
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey committed Oct 15, 2024
1 parent 6386363 commit a9580bb
Show file tree
Hide file tree
Showing 23 changed files with 718 additions and 575 deletions.
5 changes: 3 additions & 2 deletions public/app/themes/clarity/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@
require_once 'inc/amazon-s3-and-cloudfront-signing.php';
require_once 'inc/amazon-s3-and-cloudfront.php';

require_once 'inc/api/get-posts-rest-api.php';
require_once 'inc/api/campaign-api.php';
require_once 'inc/api/get-campaign-posts-api.php';
require_once 'inc/api/get-news-rest-api.php';
Expand Down Expand Up @@ -94,7 +93,6 @@
require_once 'inc/menu.php';
require_once 'inc/utilities.php';
require_once 'inc/pagination.php';
require_once 'inc/pagination-newscategory.php';

require_once 'inc/post-types/post.php';
require_once 'inc/post-types/event.php';
Expand All @@ -120,6 +118,9 @@
new MOJ\Intranet\WPOffloadMedia();
new MOJ\Intranet\WPElasticPress();

$search = new MOJ\Intranet\Search();
$search->hooks();

/// Prevent the Agency Switcher page from being overwritten
add_action('save_post', function ($post_id, $post) {
if ($post->post_name === 'agency-switcher') {
Expand Down
2 changes: 1 addition & 1 deletion public/app/themes/clarity/inc/api/get-news-rest-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function get_news_api($set_cpt = '')
$oAgency = new Agency();
$activeAgency = $oAgency->getCurrentAgency();
$post_per_page = 10;
$post_type = 'news';
$post_type = get_post_type();
$post_id = get_the_ID();
$region_id = get_the_terms($post_id, 'region');
$regional_template = get_post_meta(get_the_ID(), 'dw_regional_template', true);
Expand Down
41 changes: 0 additions & 41 deletions public/app/themes/clarity/inc/api/get-posts-rest-api.php

This file was deleted.

Loading

0 comments on commit a9580bb

Please sign in to comment.