Retrieve value between 2 post

Here is a simple test drive for your question. // suppose you paste it into a template, eg. page.php or single.php // I leave out any test or checking, to show to concept function display_other_post() { global $post; $current_post_id = $post->ID; $other_post_id = 14; $other_post = get_post( $other_post_id ); print_r( $other_post ); // do whatever … Read more

Check if checkbox is marked on publish/update post

Working code: add_action( ‘acf/save_post’, ‘fritlaeg_artikel_3m’ ); function fritlaeg_artikel_3m( $post_id ) { if( get_post_meta( $post_id, ‘fritlaeg_artikel_i_3_maneder’, true ) ) { // Getting a UNIX Timestamp $timestamp = time(); // Using WordPress Time Constants // https://codex.wordpress.org/Easier_Expression_of_Time_Constants $timestamp_after_hour = $timestamp + 0.5 * MINUTE_IN_SECONDS; // Define remaining parameters $args = array( $post_id ); $hook = ‘fritlaegning_clear_meta_data’; // Get … Read more

WordPress display breadcrumbs using Yoast plugin [closed]

I went to the Yoast website and just took a look at the breadcrumbs they use: <nav class=”row breadcrumb” aria-label=”You are here:”> <span> <span><a href=”https://yoast.com/”>Home</a> » <span><a href=”https://yoast.com/help/”>Help center</a> » <span><a href=”https://yoast.com/help/category/wordpress-plugins/”>WordPress plugins</a> » <span><a href=”https://yoast.com/help/category/yoast-seo-woocommerce/”>Yoast SEO: WooCommerce</a> » <span class=”breadcrumb_last” aria-current=”page”>How to implement Yoast SEO breadcrumbs</span> </span> </span> </span> </span> </span> </nav> You’ll notice … Read more