Merging two pages into one homepage

Your theme is dynamically loading a template part. Look here: $home_layout = get_post_meta($id, ‘home_layout’, true) ? get_post_meta($id,’home_layout’, true) : ‘style1’; get_template_part( ‘inc/templates/homepage/’.$home_layout ); Now look in your folder at inc/templates/homepage/ and you should see the various template parts. Those templates parts are where you’ll want to add your new code (for the about page).

Is it possible to show multiple (custom) post types at the wp homepage only by using pluging code?

Something like this should achieve your goal. You may need to remove the is_main_query() check depending on where you want this to show up though. add_filter(‘pre_get_posts’, ‘projects_are_posts’); function projects_are_posts($query) { if (is_admin() || !is_main_query() ) { return $query; } $types = $query->get(‘post_type’); if (!is_array($types)) { $types = array($types); } if (in_array(‘post’, $types) && !in_array(‘projects’, $types)) … Read more

Automatically set Homepage

You want to use update_option for that. https://developer.wordpress.org/reference/functions/update_option/ function set_home_page($post_id) { update_option( ‘page_on_front’, $post_id ); update_option( ‘show_on_front’, ‘page’ ); } add_action( ‘publish_post’, ‘set_home_page’ );

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)