Skip to content
Advertisement

Tag: custom-post-type

WordPress hide post from custom post-type on a single page

Initial situation custom post-type (projects)[projects.php] custom field (with cmb2)[projects.php] front-page.php What I want On my front-page is a section ( <div class=”m-rowteaser m-rowteaser–default”> ) what is displaying a random post from the post-type projects. There are some post that I don’t want to see at the front-page. Note: the post must be active because there is another page with these

Load More Custom Posts On Click Ajax WordPress

I’m trying to create a load more button that loads more custom post types on click, however, I keep receiving a 400 (Bad Request) error. Here is the code i’m using.      add_action(‘wp_ajax_nopriv_more_post_ajax’, ‘more_post_ajax’); add_action(‘wp_ajax_more_post_ajax’, ‘more_post_ajax’); Answer There is a good amount here to fix. Your Ajax is syntax is off a bit. Also, you can specify posts per page

Advertisement