Output shows a page instead of a list of blog postings

I have the below code in front-page.php (with that page set in Settings > Reading); however, something is wrong because the posts aren’t showing. The output is shown below. Can someone identify what the problem may be? <?php get_header();?> <section id=”home-content”> <section id=”latest-news”> <h2>Latest News</h2> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <article … Read more

Preventing frontpage to be deleted/moved to trash

I want to prevent my frontpage to be deleted/moved to trash using this: add_action( ‘wp_trash_post’, ‘tcb_page_delete_check’ ); add_action( ‘before_delete_post’, ‘tcb_page_delete_check’ ); function tcb_page_delete_check( $post_id ){ $frontpage = get_option( ‘page_on_front’); $blogpage = get_option(‘page_for_posts’); if( $post_id === $frontpage || $post_id === $blogpage ) { wp_redirect(admin_url(‘edit.php?post_type=page’)); exit; } } The problem is that option(‘page_on_front’)’s ID get’s changed from … Read more

`post_type` => `any` not giving me my custom post

I’m using Roots Bedrock + Sage 9 Beta 3. I’ve created a custom post of type lp that I want to set as my homepage. Here is the code I’m using: function cptui_register_my_cpts_lp() { /** * Post Type: Landing Pages. */ $labels = array( “name” => __( ‘Landing Pages’, ‘sage’ ), “singular_name” => __( ‘Landing … Read more

How to display blog posts on a dedicated page?

I’m in the middle of moving to WordPress from another CMS. I definitely have to keep the links intact, which are like this: example.com (Redirects to /blog) example.com/blog (The blog, displaying all the articles) example.com/blog/article (A specific article) example.com/about (A static page) example.com/portfolio (Another static page) Right now, however, only the static pages work as … Read more

Should I use custom post types for a front page video feature (vimeo)?

I’d like to create a front page video feature that embeds a vimeo video of the users choosing. I’d like the user to only have to input the video code. For instance, for http://vimeo.com/24474320 – I’d like them only to have to input “24474320”. Should I use custom post types for this? If so, how … Read more