Is there a way to backdate posts?
To manually edit publish date, click the Edit link in the Publish box when editing a post and set the date to whatever you’d like.
To manually edit publish date, click the Edit link in the Publish box when editing a post and set the date to whatever you’d like.
You can do this by setting ‘with_front’ => false while registering the new custom post type, To remove the custom post type slug which WordPress adds by default, pass ‘slug’=>” empty. E.g. //Example – how to pass array to rewrite $args = array( // This rewrite settings will remove the slug you want also the … Read more
You are on the correct path on thinking about post-edit.php. http://core.trac.wordpress.org/browser/tags/3.3.1/wp-admin/post-new.php#L45 See how get_default_post_to_edit is called to return a new post. The second argument tells it to create a post in the database. The function is defined here: http://core.trac.wordpress.org/browser/tags/3.3.1/wp-admin/includes/post.php#L394 Note line 422: $post_id = wp_insert_post( array( ‘post_title’ => __( ‘Auto Draft’ ), ‘post_type’ => $post_type, … Read more
No, all posts, pages and other custom post types exist in the same table (wp_posts) and they all share the same ID column. The ID is unique to each entry regardless of its post type.
one possibility is to run all posts through the loop and only output the month once per new month: <?php $counter = 0; $ref_month=””; $monthly = new WP_Query(array(‘posts_per_page’ => -1)); if( $monthly->have_posts() ) : while( $monthly->have_posts() ) : $monthly->the_post(); if( get_the_date(‘mY’) != $ref_month ) { if( $ref_month ) echo “\n”.'</ul>’; echo “\n”.'<h6>’.get_the_date(‘F’).'</h6>’; echo “\n”.'<ul>’; $ref_month … Read more
You can use the get_comments function to retrieve comments from a specific user. $comments = get_comments( array( ‘user_id’ => 1 ) ); foreach( $comments as $comment ) { $post_id = $comment->comment_post_ID; $post = get_post( $post_id ); setup_postdata( $post ); echo ‘<a href=”‘ . get_permalink() . ‘”>’ . get_the_title() . ‘</a>’; echo $comment->comment_author . ‘<br />’ … Read more
From what I understand you want to order posts by their modified date. If so, then this should be a solution: How to order posts by modified date without using ‘query_posts’?
Use get_the_terms() and count the resulting array: print count( get_the_terms( $post->ID, ‘category’ ) ) . ‘ categories’;
When you insert an image to the post you see Add media modal dialog. It has a field named Link URL with three buttons underneath, including None to remove the link. Screenshot:
Actually, this is a common problem. When you add a custom post type, you’re also registering a new rewrite rule with WordPress. However you must flush your rewrite rules after registering things in order to get WordPress to recognize them. With a plugin, this is fixed by hooking your CPT registration to both init (so … Read more