- This topic has 17 replies, 4 voices, and was last updated 3 years, 3 months ago by
David.
-
AuthorPosts
-
August 5, 2020 at 6:04 am #1388107
Mark Quadros
Tried to look through old posts, but I can’t seem to find a 2020 guide to doing so. I remember trying a few guides before, but they didn’t fix it.
Can someone please help?
August 5, 2020 at 6:30 am #1388131David
StaffCustomer SupportHi there,
use this PHP snippet:
https://docs.generatepress.com/article/generate_post_date_output/#only-show-updated-date
August 5, 2020 at 7:28 am #1388185Rohan Verma
Hi David,
1. How can I move the date icon before the published/updated date?
2. And how can I show Published text for the not updated articles?August 5, 2020 at 7:30 am #1388188Mark Quadros
Added it to my functions.php file, but no fix:
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION // AUTO GENERATED - Do not modify or remove comment markers above or below: if ( !function_exists( 'child_theme_configurator_css' ) ): function child_theme_configurator_css() { wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css', array( 'generate-style-grid','generate-style','generate-style','generate-mobile-style' ) ); } endif; add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 20 ); add_action( 'wp_head','tu_insert_into_wp_head' ); function tu_insert_into_wp_head() { ?> <meta name="msvalidate.01" content="5886BA475579089A0597DCAC6DCA4CF8" /> <meta name="yandex-verification" content="30550970532b8029" /> <?php } // END ENQUEUE PARENT ACTION /***************** FAQ ***************/ add_Shortcode('themehtmml','themehtml_fuction'); function themehtml_fuction(){ ob_start(); ?> <div style="visibility: hidden; position: absolute; width: 0px; height: 0px;"> <svg xmlns="http://www.w3.org/2000/svg"> <symbol viewBox="0 0 24 24" id="expand-more"> <path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> <symbol viewBox="0 0 24 24" id="close"> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> </svg> </div> <details open> <summary> Do you really understand B2B content? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes I do, I currently ghostwrite for a B2B SaaS brand. On another note, here’s an article I wrote on B2B vs B2C content marketing.</p> </details> <details> <summary> Why should I hire you over some cheaper alternative on Upwork? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p> Unlike some Upwork writer, I don’t thoughtlessly bang out words. Instead, I first spend a lot of time and energy to understand your brand, TA, etc and only then bang out words on my keyboard — notice the difference?</p> </details> <details> <summary> How long is your average turnaround time? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I usually take up to 1 week for short-form content, but this can vary based on the complexity and research requirement of the project.</p> </details> <details> <summary> Do you have experience with WordPress? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com). So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> Do you have experience with SEO? What about some SEO Proof? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com) and am kind of a WordPress Guru. So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> What content marketing tools do you use? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I currently use two tools Ahrefs (for SEO stuff) and Grammarly Pro (for content stuff).</p> </details> <details> <summary> Do you have any references? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! Feel free to contact Brittany Ryan (my current client) to ask about me.</p> </details> <?php return ob_get_clean(); } /***Contributors**/ //Allow Contributors to Add Media if ( current_user_can('contributor') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_contributor_uploads'); function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); } /** date hide **/ add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; $updated_time = get_the_modified_time( 'U' ); $published_time = get_the_time( 'U' ) + 86400; if ( $updated_time > $published_time ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 ); /***************** PRICING TABLE ***************/ /***************** PRICING TABLE ***************/ add_Shortcode('themehtmltwo','themehtmltwo_fuction'); function themehtmltwo_fuction(){ ob_start(); ?> <section id="content"> <div class="card"> <div class="card-content"> <h3>Short-Form Content</h3> <hr> <h2><span>$</span>500+</h2> <p>Thought-leadership content for decision-makers.</p> <hr> <div class="card-info"> <p>Up to 1000 words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> <div class="card special"> <div class=medal> <div class="medal-outer"> <div class="medal-inner"></div> </div> <div class="ribbons"> <div class="ribbon left"></div> <div class="ribbon right"></div> </div> </div> <div class="card-header"> <p>RECOMMENDED ADD-ON</p> </div> <div class="card-content"> <h3>Content SEO Plan</h3> <hr> <h2><span>$</span>250+</h2> <p>Detailed content plan to find gaps in your niche and learn how to beat it. </p> <hr> <div class="card-info"> <p>Extensive Keyword Research</p> <p>SERP Analysis</p> <p>Competitor Analysis</p> <p>Topic ideas + POA</p> </div> <hr> <p>*Price varies based on requirement. </p> <a href="mailto:contact@markxquadros.com"> <button>Boost My Content</button> </a> </div> </div> <div class="card"> <div class="card-content"> <h3>Long-form Content</h3> <hr> <h2><span>$</span>1500+</h2> <p>Extensive content for technicians and enthusiasts.</p> <hr> <div class="card-info"> <div class="card-info"> <p>3000+ words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> </section> <?php add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 ); return ob_get_clean(); }
August 5, 2020 at 7:31 am #1388193Mark Quadros
Look for “/** date hide **/” That’s where I added the code.
August 5, 2020 at 7:44 am #1388209David
StaffCustomer SupportLooking at your functions.php you provided here
You added it inside the previous shortcode function.
Place it the very end – ie. AFTER these last two lines:
return ob_get_clean(); }
Rohan, can you raise a new topic where we can deal with your request directly.
August 5, 2020 at 7:47 am #1388214Rohan Verma
It looks like this https://prnt.sc/tujchs
August 5, 2020 at 7:48 am #1388272David
StaffCustomer SupportDid you see this:
Rohan, can you raise a new topic where we can deal with your request directly.
August 5, 2020 at 8:01 am #1388375Mark Quadros
same issue
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION // AUTO GENERATED - Do not modify or remove comment markers above or below: if ( !function_exists( 'child_theme_configurator_css' ) ): function child_theme_configurator_css() { wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css', array( 'generate-style-grid','generate-style','generate-style','generate-mobile-style' ) ); } endif; add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 20 ); add_action( 'wp_head','tu_insert_into_wp_head' ); function tu_insert_into_wp_head() { ?> <meta name="msvalidate.01" content="5886BA475579089A0597DCAC6DCA4CF8" /> <meta name="yandex-verification" content="30550970532b8029" /> <?php } // END ENQUEUE PARENT ACTION /***************** FAQ ***************/ /***************** FAQ ***************/ /***************** FAQ ***************/ /***************** FAQ ***************/ add_Shortcode('themehtmml','themehtml_fuction'); function themehtml_fuction(){ ob_start(); ?> <div style="visibility: hidden; position: absolute; width: 0px; height: 0px;"> <svg xmlns="http://www.w3.org/2000/svg"> <symbol viewBox="0 0 24 24" id="expand-more"> <path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> <symbol viewBox="0 0 24 24" id="close"> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> </svg> </div> <details open> <summary> Do you really understand B2B content? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes I do, I currently ghostwrite for a B2B SaaS brand. On another note, here’s an article I wrote on B2B vs B2C content marketing.</p> </details> <details> <summary> Why should I hire you over some cheaper alternative on Upwork? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p> Unlike some Upwork writer, I don’t thoughtlessly bang out words. Instead, I first spend a lot of time and energy to understand your brand, TA, etc and only then bang out words on my keyboard — notice the difference?</p> </details> <details> <summary> How long is your average turnaround time? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I usually take up to 1 week for short-form content, but this can vary based on the complexity and research requirement of the project.</p> </details> <details> <summary> Do you have experience with WordPress? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com). So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> Do you have experience with SEO? What about some SEO Proof? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com) and am kind of a WordPress Guru. So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> What content marketing tools do you use? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I currently use two tools Ahrefs (for SEO stuff) and Grammarly Pro (for content stuff).</p> </details> <details> <summary> Do you have any references? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! Feel free to contact Brittany Ryan (my current client) to ask about me.</p> </details> <?php return ob_get_clean(); } /***Contributors**/ /***Contributors**/ /***Contributors**/ /***Contributors**/ //Allow Contributors to Add Media if ( current_user_can('contributor') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_contributor_uploads'); function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); } /***************** PRICING TABLE ***************/ /***************** PRICING TABLE ***************/ add_Shortcode('themehtmltwo','themehtmltwo_fuction'); function themehtmltwo_fuction(){ ob_start(); ?> <section id="content"> <div class="card"> <div class="card-content"> <h3>Short-Form Content</h3> <hr> <h2><span>$</span>500+</h2> <p>Thought-leadership content for decision-makers.</p> <hr> <div class="card-info"> <p>Up to 1000 words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> <div class="card special"> <div class=medal> <div class="medal-outer"> <div class="medal-inner"></div> </div> <div class="ribbons"> <div class="ribbon left"></div> <div class="ribbon right"></div> </div> </div> <div class="card-header"> <p>RECOMMENDED ADD-ON</p> </div> <div class="card-content"> <h3>Content SEO Plan</h3> <hr> <h2><span>$</span>250+</h2> <p>Detailed content plan to find gaps in your niche and learn how to beat it. </p> <hr> <div class="card-info"> <p>Extensive Keyword Research</p> <p>SERP Analysis</p> <p>Competitor Analysis</p> <p>Topic ideas + POA</p> </div> <hr> <p>*Price varies based on requirement. </p> <a href="mailto:contact@markxquadros.com"> <button>Boost My Content</button> </a> </div> </div> <div class="card"> <div class="card-content"> <h3>Long-form Content</h3> <hr> <h2><span>$</span>1500+</h2> <p>Extensive content for technicians and enthusiasts.</p> <hr> /** date hide **/ /** date hide **/ /** date hide **/ /** date hide **/ /** date hide **/ add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; $updated_time = get_the_modified_time( 'U' ); $published_time = get_the_time( 'U' ) + 86400; if ( $updated_time > $published_time ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 ); <div class="card-info"> <div class="card-info"> <p>3000+ words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> </section> <?php add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 ); return ob_get_clean(); }
August 5, 2020 at 8:01 am #1388376Mark Quadros
I think Rohan is trying to help with my issue
August 5, 2020 at 11:17 am #1388572Leo
StaffCustomer SupportDid David’s suggestion here work?
https://generatepress.com/forums/topic/how-to-add-last-modified-date-to-posts-in-2020/#post-1388131August 5, 2020 at 10:31 pm #1388973Mark Quadros
No it didn’t. I’ve pasted the PHP code in my functions.php childtheme.
Once again, here’s my code:
<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION // AUTO GENERATED - Do not modify or remove comment markers above or below: if ( !function_exists( 'child_theme_configurator_css' ) ): function child_theme_configurator_css() { wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css', array( 'generate-style-grid','generate-style','generate-style','generate-mobile-style' ) ); } endif; add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 20 ); add_action( 'wp_head','tu_insert_into_wp_head' ); function tu_insert_into_wp_head() { ?> <meta name="msvalidate.01" content="5886BA475579089A0597DCAC6DCA4CF8" /> <meta name="yandex-verification" content="30550970532b8029" /> <?php } // END ENQUEUE PARENT ACTION /***************** FAQ ***************/ /***************** FAQ ***************/ /***************** FAQ ***************/ /***************** FAQ ***************/ add_Shortcode('themehtmml','themehtml_fuction'); function themehtml_fuction(){ ob_start(); ?> <div style="visibility: hidden; position: absolute; width: 0px; height: 0px;"> <svg xmlns="http://www.w3.org/2000/svg"> <symbol viewBox="0 0 24 24" id="expand-more"> <path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> <symbol viewBox="0 0 24 24" id="close"> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> </svg> </div> <details open> <summary> Do you really understand B2B content? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes I do, I currently ghostwrite for a B2B SaaS brand. On another note, here’s an article I wrote on B2B vs B2C content marketing.</p> </details> <details> <summary> Why should I hire you over some cheaper alternative on Upwork? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p> Unlike some Upwork writer, I don’t thoughtlessly bang out words. Instead, I first spend a lot of time and energy to understand your brand, TA, etc and only then bang out words on my keyboard — notice the difference?</p> </details> <details> <summary> How long is your average turnaround time? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I usually take up to 1 week for short-form content, but this can vary based on the complexity and research requirement of the project.</p> </details> <details> <summary> Do you have experience with WordPress? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com). So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> Do you have experience with SEO? What about some SEO Proof? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com) and am kind of a WordPress Guru. So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> What content marketing tools do you use? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I currently use two tools Ahrefs (for SEO stuff) and Grammarly Pro (for content stuff).</p> </details> <details> <summary> Do you have any references? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! Feel free to contact Brittany Ryan (my current client) to ask about me.</p> </details> <?php return ob_get_clean(); } /***Contributors**/ /***Contributors**/ /***Contributors**/ /***Contributors**/ //Allow Contributors to Add Media if ( current_user_can('contributor') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_contributor_uploads'); function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); } /***************** PRICING TABLE ***************/ /***************** PRICING TABLE ***************/ add_Shortcode('themehtmltwo','themehtmltwo_fuction'); function themehtmltwo_fuction(){ ob_start(); ?> <section id="content"> <div class="card"> <div class="card-content"> <h3>Short-Form Content</h3> <hr> <h2><span>$</span>500+</h2> <p>Thought-leadership content for decision-makers.</p> <hr> <div class="card-info"> <p>Up to 1000 words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> <div class="card special"> <div class=medal> <div class="medal-outer"> <div class="medal-inner"></div> </div> <div class="ribbons"> <div class="ribbon left"></div> <div class="ribbon right"></div> </div> </div> <div class="card-header"> <p>RECOMMENDED ADD-ON</p> </div> <div class="card-content"> <h3>Content SEO Plan</h3> <hr> <h2><span>$</span>250+</h2> <p>Detailed content plan to find gaps in your niche and learn how to beat it. </p> <hr> <div class="card-info"> <p>Extensive Keyword Research</p> <p>SERP Analysis</p> <p>Competitor Analysis</p> <p>Topic ideas + POA</p> </div> <hr> <p>*Price varies based on requirement. </p> <a href="mailto:contact@markxquadros.com"> <button>Boost My Content</button> </a> </div> </div> <div class="card"> <div class="card-content"> <h3>Long-form Content</h3> <hr> <h2><span>$</span>1500+</h2> <p>Extensive content for technicians and enthusiasts.</p> <hr> /** date hide **/ /** date hide **/ /** date hide **/ /** date hide **/ /** date hide **/ add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; $updated_time = get_the_modified_time( 'U' ); $published_time = get_the_time( 'U' ) + 86400; if ( $updated_time > $published_time ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 ); <div class="card-info"> <div class="card-info"> <p>3000+ words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> </section> <?php add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 ); return ob_get_clean(); }
August 5, 2020 at 10:32 pm #1388974Mark Quadros
Look for the last bit of the code where it says ” /** date hide **/” I really need to fix this issue.
August 6, 2020 at 2:06 am #1389149David
StaffCustomer SupportYou have 2 instances of the code we provided both of which are inside the shortcode function.
Update your code to this:<?php // Exit if accessed directly if ( !defined( 'ABSPATH' ) ) exit; // BEGIN ENQUEUE PARENT ACTION // AUTO GENERATED - Do not modify or remove comment markers above or below: if ( !function_exists( 'child_theme_configurator_css' ) ): function child_theme_configurator_css() { wp_enqueue_style( 'chld_thm_cfg_separate', trailingslashit( get_stylesheet_directory_uri() ) . 'ctc-style.css', array( 'generate-style-grid','generate-style','generate-style','generate-mobile-style' ) ); } endif; add_action( 'wp_enqueue_scripts', 'child_theme_configurator_css', 20 ); add_action( 'wp_head','tu_insert_into_wp_head' ); function tu_insert_into_wp_head() { ?> <meta name="msvalidate.01" content="5886BA475579089A0597DCAC6DCA4CF8" /> <meta name="yandex-verification" content="30550970532b8029" /> <?php } // END ENQUEUE PARENT ACTION /***************** FAQ ***************/ /***************** FAQ ***************/ /***************** FAQ ***************/ /***************** FAQ ***************/ add_Shortcode('themehtmml','themehtml_fuction'); function themehtml_fuction(){ ob_start(); ?> <div style="visibility: hidden; position: absolute; width: 0px; height: 0px;"> <svg xmlns="http://www.w3.org/2000/svg"> <symbol viewBox="0 0 24 24" id="expand-more"> <path d="M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> <symbol viewBox="0 0 24 24" id="close"> <path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/><path d="M0 0h24v24H0z" fill="none"/> </symbol> </svg> </div> <details open> <summary> Do you really understand B2B content? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes I do, I currently ghostwrite for a B2B SaaS brand. On another note, here’s an article I wrote on B2B vs B2C content marketing.</p> </details> <details> <summary> Why should I hire you over some cheaper alternative on Upwork? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p> Unlike some Upwork writer, I don’t thoughtlessly bang out words. Instead, I first spend a lot of time and energy to understand your brand, TA, etc and only then bang out words on my keyboard — notice the difference?</p> </details> <details> <summary> How long is your average turnaround time? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I usually take up to 1 week for short-form content, but this can vary based on the complexity and research requirement of the project.</p> </details> <details> <summary> Do you have experience with WordPress? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com). So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> Do you have experience with SEO? What about some SEO Proof? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! In a former life, I built custom WP websites (like www.mediaberry.co & www.rodrigoserrano.com) and am kind of a WordPress Guru. So I can definitely help you out with content uploads, optimization and Yoast stuff (it’s on me😉)</p> </details> <details> <summary> What content marketing tools do you use? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>I currently use two tools Ahrefs (for SEO stuff) and Grammarly Pro (for content stuff).</p> </details> <details> <summary> Do you have any references? <svg class="control-icon control-icon-expand" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#expand-more" /></svg> <svg class="control-icon control-icon-close" width="24" height="24" role="presentation"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#close" /></svg> </summary> <p>Yes! Feel free to contact Brittany Ryan (my current client) to ask about me.</p> </details> <?php return ob_get_clean(); } /***Contributors**/ /***Contributors**/ /***Contributors**/ /***Contributors**/ //Allow Contributors to Add Media if ( current_user_can('contributor') && !current_user_can('upload_files') ) add_action('admin_init', 'allow_contributor_uploads'); function allow_contributor_uploads() { $contributor = get_role('contributor'); $contributor->add_cap('upload_files'); } /***************** PRICING TABLE ***************/ /***************** PRICING TABLE ***************/ add_Shortcode('themehtmltwo','themehtmltwo_fuction'); function themehtmltwo_fuction(){ ob_start(); ?> <section id="content"> <div class="card"> <div class="card-content"> <h3>Short-Form Content</h3> <hr> <h2><span>$</span>500+</h2> <p>Thought-leadership content for decision-makers.</p> <hr> <div class="card-info"> <p>Up to 1000 words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> <div class="card special"> <div class=medal> <div class="medal-outer"> <div class="medal-inner"></div> </div> <div class="ribbons"> <div class="ribbon left"></div> <div class="ribbon right"></div> </div> </div> <div class="card-header"> <p>RECOMMENDED ADD-ON</p> </div> <div class="card-content"> <h3>Content SEO Plan</h3> <hr> <h2><span>$</span>250+</h2> <p>Detailed content plan to find gaps in your niche and learn how to beat it. </p> <hr> <div class="card-info"> <p>Extensive Keyword Research</p> <p>SERP Analysis</p> <p>Competitor Analysis</p> <p>Topic ideas + POA</p> </div> <hr> <p>*Price varies based on requirement. </p> <a href="mailto:contact@markxquadros.com"> <button>Boost My Content</button> </a> </div> </div> <div class="card"> <div class="card-content"> <h3>Long-form Content</h3> <hr> <h2><span>$</span>1500+</h2> <p>Extensive content for technicians and enthusiasts.</p> <hr> <div class="card-info"> <div class="card-info"> <p>3000+ words</p> <p>Keyword research</p> <p>On-page SEO</p> <p> </div> <hr> <a href="mailto:contact@markxquadros.com"> <button>Enquire</button> </a> </div> </div> </section> <?php return ob_get_clean(); } /** date hide **/ /** date hide **/ /** date hide **/ /** date hide **/ /** date hide **/ add_filter( 'generate_post_date_output', function( $output, $time_string ) { $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; $updated_time = get_the_modified_time( 'U' ); $published_time = get_the_time( 'U' ) + 86400; if ( $updated_time > $published_time ) { $time_string = '<time class="entry-date updated-date" datetime="%3$s" itemprop="dateModified">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); return sprintf( '<span class="posted-on">%s</span> ', $time_string ); }, 10, 2 );
August 6, 2020 at 9:43 pm #1390628Mark Quadros
Okay, great! That fixed it, but one last question:
I looked up my article on SERP and found that the original published date is still the one that’s displayed. Is this a caching issue, or do I have to wait for Google to index this code change in order to display the “Last modified” date in SERPs?
Here’s a screenshot of one of my articles on SERP. Click here.
-
AuthorPosts
- You must be logged in to reply to this topic.