How to make a hivepress post type to be treated as a blog post?

The question is because I would like to feature a classified post in the home page of website which use sliders only for blog post types, there is possible to use a function that treat hivepress post type like a blog post type? Thank you very much!

Unfortunately that’s not possible because WordPress uses the “post” type for blog posts, while HivePress uses the “hp_listing” one for listings. Please check if the block or widget you’re using has an option for selecting another post type to display.

Not block or widget allow different post type. I will try to edit theme as a child theme, what are fthe ile names usually used in themes to deal with post types? Thank you very much again for your kindly reply.

There’s no way to do this because HivePress and all its extensions expect the “hp_listing” post type, it’s not possible to override all these core files via a child theme.
I recommend looking for a block or widget that supports custom post types, for example this one supports custom post types Post Sliders & Post Grids – WordPress plugin | WordPress.org You can try searching for “custom post type gallery plugin”, “custom post type slider plugin”.

You can also do without plugin. Add this snippet:

function add_this_script_footer(){ ?>
<script type="text/javascript">
[( function($) {
'use strict';
$('.slider-listings .hp-listings > .hp-row').slick({
    dots: false,
    infinite: true,
    speed: 2000,
    autoplay: true,
    arrows: true,
	prevArrow: '<div class="slick-arrow slick-prev"><i class="hp-icon fas fa-chevron-left"></i></div>',
	nextArrow: '<div class="slick-arrow slick-next"><i class="hp-icon fas fa-chevron-right"></i></div>',
    slidesToShow: 3,
    slidesToScroll: 1,
    responsive: [
        {
          breakpoint: 990,
          settings: {
            slidesToShow: 3,
            slidesToScroll: 1,
             arrows: true,
            infinite: true,
          }
        },
        {
          breakpoint: 768,
          settings: {
            slidesToShow: 2,
             arrows: true,
            slidesToScroll: 1
          }
        },
        {
          breakpoint: 600,
          settings: {
            slidesToShow: 1,
             arrows: true,
            slidesToScroll: 1
          }
        },
    ]
  });
} (jQuery) )]
</script>
<?php } 
add_action('wp_footer', 'add_this_script_footer', 20); 

and afterwards you can use

<div class="slider-listings">
[hivepress_listings number="10"]
</div>

to display listings inside a slider in the homepage

3 Likes

Thank you very much!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.