Parcourir la source

faculty profile 23

Rousnay il y a 1 an
Parent
commit
1ce4914c40
1 fichiers modifiés avec 5 ajouts et 8 suppressions
  1. 5 8
      single-faculty.php

+ 5 - 8
single-faculty.php

@@ -13,15 +13,12 @@ get_header(); ?>
 	$post_blocks = parse_blocks(get_the_content('', false, 166));
 
 	foreach ($post_blocks as $block) {
-		if ('acf/faculty_member' != $block['faculty_member']) {
-			continue;   // Skip this block if it's not the right block type
+		if ($block["blockName"] == "acf/faculty-member") {
+			if (isset($block['attrs']["data"]["login_id"])) {
+				$my_block_id = $block['attrs']["data"]["login_id"];
+				break;  // Found a hit, get out of the loop
+			}
 		}
-
-		if (isset($block['attrs']["data"]["login_id"])) {
-			$my_block_id = $block['attrs']["data"]["login_id"];
-			break;  // Found a hit, get out of the loop
-		}
-
 		var_dump($my_block_id);
 	}