Skip to content

Commit

Permalink
Removing some obsolete functions that created php notices
Browse files Browse the repository at this point in the history
  • Loading branch information
Wohlfarth committed Sep 17, 2024
1 parent 0fd2a5c commit eeb1f59
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 40 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# ignores pieces
node_modules
.DS_Store
40 changes: 0 additions & 40 deletions home.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,46 +158,6 @@ function onCatChange() {




<?php
add_action('genesis_before_loop', 'art_change_home_loop');



function art_change_home_loop() {


/** Replace the home loop with our custom **/
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'art_custom_loop' );

/** Custom loop **/
function art_custom_loop() {

?>

<?php

/*
$categories = get_the_category();
$category_id = $categories[0]->cat_ID;
*/

global $post;
$cat_obj = get_queried_object();
$thiscat_id = $cat_obj->term_id;
$thiscat = get_category($thiscat_id);
$parentcat = get_category($thiscat->parent);

$cat = get_query_var('news');
$category = get_category ($thiscat);
// echo '<h1>'.$category->cat_name.'</h1>';
echo do_shortcode('[ajax_load_more category="'.$category->slug.'" cache="true" cache_id="cache-'.$category->slug.'" posts_per_page="9"]');
}
}
?>


<?php
add_action('genesis_after_loop', function(){?>

Expand Down

0 comments on commit eeb1f59

Please sign in to comment.