Retrieve post modified date for specific post by post ID

Place this code snippet put in function.php, this should give you what you need. function my_theme_wp_title( $title, $sep ) { global $post; /* my other title cases */ //get post’s modified date $m_date = get_the_modified_date(); //concatenate the current title with the date string, using the separator to be more clear $title .= $sep . ” … Read more

Help with CPT template pagination

there is no need to handle the pagination like this: $paged = get_query_var( ‘paged’, 1 ); Just put this after the loop: get_the_posts_pagination( ‘mid_size’ => 1, ‘prev_text’ => ‘&nbsp;’, ‘next_text’ => ‘&nbsp;’, ‘screen_reader_text’ => ‘A’ ) like this: if( have_posts() ){ while( have_posts() ){ the_post();?> the_content();?> <?php } echo get_the_posts_pagination( ‘mid_size’ => 1, ‘prev_text’ => … Read more

Child theme template file will not load

This is a basic WordPress question, please get familiar with theme theming concepts. Basic theme: https://codex.wordpress.org/Theme_Development Child themes: https://codex.wordpress.org/Child_Themes Theme hierarchy Parent theme style.css /* Theme Name: Twenty Fifteen Theme URI: https://wordpress.org/themes/twentyfifteen/ Author: the WordPress team Author URI: https://wordpress.org/ Description: Twenty Fifteen Version: 1.3 License: GNU General Public License v2 or later License URI: http://www.gnu.org/licenses/gpl-2.0.html … Read more

Updating modified templates

Yes, it’s about to check changes after updates of main theme, mostly updates goes to core of theme, not files like single.php etc.. but when it’s go this way, you need some Diff program. Check this out: https://stackoverflow.com/questions/25874018/comparing-the-contents-of-two-files-in-sublime-text

I am trying to output portfolio items with a picture. This code doesn’t seem to be working. What am I doing wrong?

Are you trying to show the ‘featured image’? Or can you use it? If so, there is a simple way to do it: Add this line of code in your theme’s functions.php file, or be sure that it has this: add_theme_support( ‘post-thumbnails’ ); Add this line where you want to show the image: the_post_thumbnail(); Following … Read more