Remove ‘portfolio’ from URL
You could try this plugin I wrote: https://github.com/interconnectit/custom-post-type-permalinks
You could try this plugin I wrote: https://github.com/interconnectit/custom-post-type-permalinks
If you want to do that yourself, take a look at function add_meta_box (don’t forget the examples). That page has almost everything you need to create a custom meta box for a certain post type. If you want to simplify your work, you might want to use an utility like Meta Box plugin. This plugin … Read more
The database is not just storing the posts that you have created, it stores revisions of that post along with other post types, etc. all in this table. So the post ids of the posts that we enter rarely go up one at a time. The post ids themselves are not very relevant in the … Read more
You can create capabilities for each custom post type and add this to the different roles; see this answer from an question here.
Are you just outputting the pages for the navigation with wp_list_pages() or a similar function? It might be better to use the WordPress Menu feature and create a menu for the navigation, then use wp_nav_menu() to display it. Alternatively, instead of setting a static page in the backend you can edit (or create) the home.php … Read more
@nimmolo since we solved this, we should leave for posterity that the solution had nothing to do with pre_get_posts. We needed to check the post class selectors for the video posts were the same as for regular posts.
I think you have to add your own <li> when using callback. https://codex.wordpress.org/Function_Reference/wp_list_comments (see bottom info)
Easiest thing to do is look at twentyten or twentyeleven – each one a default WordPress theme – and see how comment functions are implemented in those. basically, it’s a comments.php file, a function in functions.php and a function call in a theme file, i.e. like your home.php. You may have to revert to the … Read more
I had to load WordPress in order to use the wpdb function. How silly :p. To do so: $parse_uri = explode( ‘wp-content’, $_SERVER[‘SCRIPT_FILENAME’] ); require_once( $parse_uri[0] . ‘wp-load.php’ ); And then finally: global $wpdb;
If you were attempting a site migration you should have backed up all your files and database tables before changing your URL. When you change your site URL (presumably from the Settings->General option page), you are essentially modifying every link on the site to point to the new URL. If that URL is not setup … Read more