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
Tag: custom-post-type
show category and tags when using register_post_type
So i used register_post_type to add books post_type section. But i want to show category and tags(and more) on the back panel edit.php. I know how to this(adding custom fields) in regular post. …
WordPress – Filtering Custom Post Type by multiple Custom Taxonomies on front end
I’m trying to allow users to select criteria from multiple custom taxonomies in order to filter a custom post type on the front end via a from with multiple selects. My problem is that the code only works if each of the selects has criteria selected. Trying to find a way where users can also just select one of the
WordPress hook for newly published post that can access to post metadata
I need to do some actions only on newly published posts that requires post metadata. I’ve tried many different hooks, but they all also trigger for other “events” like updating post, or if they …
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
Gathering Custom post types via tags
I have set up my custom post type called ‘sectors’, using the code below: register_post_type( ‘sectors’, array( ‘labels’ => array( ‘name’ => __( ‘Sectors’ ), …