brianhorace
Forum Replies Created
-
Does that mean I would need another plugin for this? For instance I need to add an adobe chatbot and it requires my CSP to have:
script-src: https://assets.adoberesources.net https://documentcloud.adobe.com
img-src: https://assets.adoberesources.net https://lh3.googleusercontent.com
frame-src: https://documentcloud.adobe.com
font-src: https://.typekit.net style-src: ‘unsafe-inline’ https://.typekit.net
connect-src: .adobe.io wss://.adobe.ioForum: Plugins
In reply to: [Custom Post Type UI] displaying a custom taxonomy on the front endi called it includes/partials/blog/styles/masonry-material/post-taxonomies.php
and added it just below like this:
<?php // Featured image. get_template_part( 'includes/partials/blog/styles/masonry-material/post-image' ); // Output categories. get_template_part( 'includes/partials/blog/styles/masonry-material/post-categories' ); // Output categories. get_template_part( 'includes/partials/blog/styles/masonry-material/post-taxonomies' ); ?>
Forum: Plugins
In reply to: [Custom Post Type UI] displaying a custom taxonomy on the front endI tried using this in a separate file but it returned nothing, and while the php seems correct it’s posting nothing on the front end – any tips? just to reiterate I created a custom taxonomy called “resource type” I want it to show up on my blog cards:
`<?php
/**
* Post categories partial
*
* Used when “Material” masonry style is selected.
*
* @version 10.5
*/// Exit if accessed directly
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}global $post;
echo ‘<span class=”meta-category”>’;
$terms = get_the_terms( $post_id, $taxonomy );
if ( is_wp_error( $terms ) ) {
return $terms;
}if ( empty( $terms ) ) {
return false;
}$links = array();
foreach ( $terms as $term ) {
$link = get_term_link( $term, $taxonomy );
if ( is_wp_error( $link ) ) {
return $link;
}
$links[] = ‘<a href=”‘ . esc_url( $link ) . ‘” rel=”tag”>’ . $term->name . ‘</a>’;
}`Forum: Plugins
In reply to: [Custom Post Type UI] displaying a custom taxonomy on the front end…also do you guys do any custom programming?
Forum: Plugins
In reply to: [Custom Post Type UI] displaying a custom taxonomy on the front enddidnt quite work unfortunately, I believe there is an incorrect name but just not sure what it is:
/**
* Post categories partial
*
* Used when “Material” masonry style is selected.
*
* @version 10.5
*/// Exit if accessed directly
if ( ! defined( ‘ABSPATH’ ) ) {
exit;
}global $post;
echo ‘<span class=”meta-category”>’;
$resource_types = get_ancestors();
if ( ! empty( $resource_types ) ) {
$output = null;
foreach ( $resource_types as $resource_type ) {
$output .= ‘slug ) . ‘” href=”‘ . esc_url( get_ancestors_link( $resource_type->term_id ) ) . ‘”>’ . esc_html( $resource_type->name ) . ‘‘;
}
echo trim( $output ); // WPCS: XSS ok.
}echo ‘</span>’;`
Forum: Plugins
In reply to: [Custom Post Type UI] displaying a custom taxonomy on the front enddisplaying it directly after this category output would be ideal:
// Featured image.
get_template_part( ‘includes/partials/blog/styles/masonry-material/post-image’ );// Output categories.
get_template_part( ‘includes/partials/blog/styles/masonry-material/post-categories’ );Forum: Plugins
In reply to: [Custom Post Type UI] displaying a custom taxonomy on the front endThey were not of any help. I know where the code should go, I’m just having issues with the correct way to write the php.