Page content doesn’t display when published but does when previewed as draft?
This turned out to be a bug in WordPress version 3.4.2. Bug report http://core.trac.wordpress.org/ticket/15665 It’s been fixed and will roll out with WordPress version 3.5
This turned out to be a bug in WordPress version 3.4.2. Bug report http://core.trac.wordpress.org/ticket/15665 It’s been fixed and will roll out with WordPress version 3.5
This is completely untested, but the principles are in place. Get today’s date and built the title, build the slug and then insert the post as a draft. This doesn’t take care of disabling the title field from being edited. I imagine what you’re looking for would be a Javascript solution that just looks for … Read more
Don’t confuse menu structure with page/URL structure. Each one of your pages may have a different hook. Do this: function my_enqueue($hook) { echo $hook; } add_action( ‘admin_enqueue_scripts’, ‘my_enqueue’ ); Load your pages and write down the hook names. There may be other ways to do this too, like the admin-print-scripts-$hook_suffix hooks. Look in wp-admin/admin-header.php to … Read more
Use is_home() for the home page (the list of newest blog posts), and is_front_page() for the front page (can be a static page too). if( is_home() ) { wp_nav_menu( array( ‘menu’ => ‘Main Nav Menu’, ‘container’ => ” ) ); }
There’s nothing magical about it, your post type doesn’t have an archive ( has_archive is false ), so there’s no rewrite rule for your post type that matches just /%post_type%/, the only existing rules for your post type are for /%post_type%/%some_other_thing%/, so there’s no clash with your page.
You can use the globals $menu, $submenu and $wp_post_types for renaming. Code: function wpse124233_alter_builtin_post_menu_label() { global $menu; global $submenu; $menu[5][0] = __( ‘YourName’ ); $submenu[‘edit.php’][5][0] = __( ‘YourName’ ); $submenu[‘edit.php’][10][0] = __( ‘Add YourName’ ); $submenu[‘edit.php’][16][0] = __( ‘YourName Tags’ ); } add_action( ‘admin_menu’, ‘wpse124233_alter_builtin_post_menu_label’ ); function wpse124233_alter_builtin_post_labels() { global $wp_post_types; $labels = &$wp_post_types[‘post’]->labels; $labels->name … Read more
In $args you are using ‘child_of’=>5, why are you using this and if you are using this parameter you should set hide_empty => 0
Use get_term_link() to get the correct URL for a taxonomy term archive. $list .= “\n\t\t” . ‘<li><a href=”‘. get_term_link( $tag ) .'”>’.$name.'</a></li>’;
The “sort” query param is usually “orderby” not “sortby”, to match the SQL ORDER BY clause. Perhaps try: $the_query = ‘posts_per_page=-1&orderby=name&order=ASC&post_type=mycustom&custom_cat=mycat’; It’s also possible that the value you are passing is incorrect, but without knowing the details of your custom post type there’s not much else I can suggest.
You can created a post template to display the CPT post details (i.e. videos/my-video) and you can create an archive template to display a list of posts (i.e. videos/). To create a post template in a plugin, add the following to the plugin: function include_templates( $template_path ) { if ( get_post_type() == ‘videos’ ) { … Read more