How to change page location in WordPress
Under “Settings” -> “Reading” in the wp-admin you (or other users) can set which page should be used as the home page.
Under “Settings” -> “Reading” in the wp-admin you (or other users) can set which page should be used as the home page.
404 error on every post and page other than home
The easiest way to achieve this would be to use a custom post type. This way, these posts won’t show up as custom post types by default are excluded from the main query. You can just then create your page and create a custom query with WP_Query to pull in this 9 posts 1. CREATE … Read more
The $location parameter was incorrect. Try this: function redirect_to_local_110(){ wp_redirect( home_url() ); exit; } function add_home_link() { add_menu_page( ‘Course’, ‘Course’, ‘read’, ‘home’, ‘redirect_to_local_110’, ‘dashicons-welcome-learn-more’); } add_action( ‘admin_menu’, ‘add_home_link’, 1001 ); Or you could use this: function redirect_to_local_110(){ wp_redirect( ‘http://www.example.com’, 301 ); exit; } function add_home_link() { add_menu_page( ‘Course’, ‘Course’, ‘read’, ‘home’, ‘redirect_to_local_110’, ‘dashicons-welcome-learn-more’); } add_action( … Read more
if it is “a very complex theme,” then there’s probably some hook into template_redirect malfunctioning. as @TomJNowell mentioned, using home.php or front-page.php should allow you to override page.php, but that’s not always preferred (I rarely use them myself), and will not necessarily fix the problem. you don’t need to assign a blog page in order … Read more
Straight out of the Codex: $sticky = get_option( ‘sticky_posts’ ); $query = new WP_Query( ‘p=’ . $sticky[0] );
if you are just trying to put HTML inside PHP, just close PHP and wrap with HTML <?php if ( is_front_page() ) { ?> <div> HTML Code </div> <?php } ?> And use is_front_page
Ok, your theme is already set up to use different post formats, so in your case you would just need to do the following: Change the line in content-aside.php that reads the_content(‘Weiterlesen’); To read the_excerpt(); Change just that one line, save your changes, and it should work how you want. the_content() echos the post content … Read more
I think that question is solvable easy- There is a way to add custom meta box. You can basically copy this from here: add_meta_box Now, make a checkbox in the custom meta box and a hidden field with the post id. Instead of updating post meta with update_post_meta( $post_id, ‘_my_meta_value_key’, $my_data ); you now can … Read more
Welcome to WordPress! I’m going to assume you’re creating your first theme. I would start by reading about The Loop http://codex.wordpress.org/The_Loop which is a crucial concept for WordPress themes. If you designed your homepage within the WordPress admin by going to Pages, adding a new page, and putting your static homepage markup in the content … Read more