$slug, 'post_type' => 'page', 'post_status' => 'publish', 'numberposts' => 1, ); $post = get_posts( $args ); if ( ! empty( $post ) ) { $page_id = $post[0]->ID; } else { // Page doesn't exist. Create one. $postargs = array( 'post_type' => 'page', 'post_name' => $slug, 'post_title' => $page_title, 'post_status' => 'publish', 'post_author' => 1, ); // Insert the post into the database $page_id = wp_insert_post( $postargs ); } return $page_id; } /** * Enqueue style for clients bar to make sure that style doesn't brake after removing bootstrap on this section. * Note: this can be deleted in a future version. It's just for maintaining compatibility, if user updates plugin but * not the theme. */ function themeisle_hestia_enqueue_clients_style() { wp_enqueue_style( 'hestia-clients-bar', trailingslashit( THEMEISLE_COMPANION_URL ) . 'assets/css/hestia/clients-bar.css' ); }