From cb0fb58f77cce1b98c16cfa75673e8c58a66fe47 Mon Sep 17 00:00:00 2001 From: jorge-vitrubio Date: Thu, 29 Dec 2022 16:59:31 +0100 Subject: [PATCH] created function to output class of custom post type --- archive.php | 6 ++-- inc/template-functions.php | 15 +++++++++ page-templates/front-page.php.off | 53 +++++++++++++++++++++++++++++++ 3 files changed, 71 insertions(+), 3 deletions(-) create mode 100644 page-templates/front-page.php.off diff --git a/archive.php b/archive.php index 84a13f8..85b8eb8 100644 --- a/archive.php +++ b/archive.php @@ -16,11 +16,11 @@ get_header(); - + rewrite['slug']; + echo $post_type_slug; + }; +} +function ofisuport_class_posttype (){ + if( is_post_type_archive( array('ofisuport-ajut') )) { + echo ' archive-custom-post-type-'; + ofisuport_echo_posttype_slug(); + } +} diff --git a/page-templates/front-page.php.off b/page-templates/front-page.php.off new file mode 100644 index 0000000..bb159e3 --- /dev/null +++ b/page-templates/front-page.php.off @@ -0,0 +1,53 @@ + + +
+ + +
+

+
+ + +
+ +