-
AuthorPosts
-
April 9, 2021 at 4:33 pm #1293543
Hi
I have looked all through the forum but I’ve not been able to find it.
so here is my problem I have been using Toolset Types for a custom post type fund that uses tags.
I have portfolio-grid
this is what is supposed to look likethis is what it looks like now….
https://scf72.wpengine.com/grant-program/I have these snippets in my functions.php
function avf_alb_supported_post_types_mod( array $supported_post_types )
{
$supported_post_types[] = ‘fund’;
return $supported_post_types;
}
add_filter(‘avf_alb_supported_post_types’, ‘avf_alb_supported_post_types_mod’, 10, 1);//add_filter(‘avf_builder_boxes’, ‘add_builder_to_posttype’);
function add_builder_to_posttype($metabox)
{
foreach($metabox as &$meta)
{
if($meta[‘id’] == ‘avia_builder’ || $meta[‘id’] == ‘layout’)
{
$meta[‘page’][] = ‘fund’; /*instead add the name of the custom post type here*/
}
}return $metabox;
}// add the custom post-types to the builder elements
add_theme_support(‘add_avia_builder_post_type_option’);
add_theme_support(‘avia_template_builder_custom_post_type_grid’);——-
as well as a single-fund.php in my themes folder
<?php
if ( !defined(‘ABSPATH’) ){ die(); }global $avia_config;
/*
* get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
*/
get_header();$title = __(‘Blog – Latest News’, ‘avia_framework’); //default blog title
$t_link = home_url(‘/’);
$t_sub = “”;if(avia_get_option(‘frontpage’) && $new = avia_get_option(‘blogpage’))
{
$title = get_the_title($new); //if the blog is attached to a page use this title
$t_link = get_permalink($new);
$t_sub = avia_post_meta($new, ‘subtitle’);
}if( get_post_meta(get_the_ID(), ‘header’, true) != ‘no’) echo avia_title(array(‘heading’=>’strong’, ‘title’ => $title, ‘link’ => $t_link, ‘subtitle’ => $t_sub));
do_action( ‘ava_after_main_title’ );
?>
<div class=’container_wrap container_wrap_first main_color <?php avia_layout_class( ‘main’ ); ?>’>
<div class=’container template-blog template-single-blog ‘>
<main class=’content units <?php avia_layout_class( ‘content’ ); ?> <?php echo avia_blog_class_string(); ?>’ <?php avia_markup_helper(array(‘context’ => ‘content’,’post_type’=>’blog’));?>>
<?php
the_content();
/* Run the loop to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-index.php and that will be used instead.
*
*/
//get_template_part( ‘includes/loop’, ‘index’ );//blog_disabled = ( avia_get_option(‘disable_blog’) == ‘disable_blog’ ) ? true : false;
//if(!$blog_disabled)
//{
//show related posts based on tags if there are any
// get_template_part( ‘includes/related-posts’);//wordpress function that loads the comments template “comments.php”
// comments_template();
//}?>
<!–end content–>
</main><?php
$avia_config[‘currently_viewing’] = “blog”;
//get the sidebar
get_sidebar();?>
</div><!–end container–>
</div><!– close default .container_wrap element –>
<?php get_footer(); ?>
———————–
This has worked for years and it just suddenly broke .
Can you help.
Please let me know if I can provide anything else.April 13, 2021 at 6:13 am #1294024Hey akelly7,
Thank you for the inquiry.
The items display back when we disable the post type dropdown or selection in the portfolio grid element. But it displays the default posts instead of the custom post type funds.
// add_theme_support('add_avia_builder_post_type_option'); // add_theme_support('avia_template_builder_custom_post_type_grid');
Have you tried using the Blog Posts element instead? The portfolio grid element is not really intended to be used for different post types other than the portfolio items.
Best regards,
IsmaelApril 13, 2021 at 3:50 pm #1294150Hello…
I see that you commented those two line from the functions.php
And that remove the tags all together from the portfolio grid…..You suggest using the Blog post element ….expect I don’t see my custom post type there.
The strange part of this is that it was working perfectly until the latest version of Enfold 4.8.1
as you can see on https://statelinecf.org/grantsPlease help.
April 14, 2021 at 12:42 pm #1294374 -
AuthorPosts
- You must be logged in to reply to this topic.