How to get the month argument from permalink in wordpress?
the standard WP function for that is: the_date(); (source)
the standard WP function for that is: the_date(); (source)
Are you using a virtual host whose document root is different from the global document root set in httpd.conf? If so, you’ll want to specify Directory rules for that other location to include AllowOverride.
If you want to remove the category base /category/, you can install the WP no category base plugin which will add a new set of rewrite rules for categories. the side-effect of this is that you can set your post permalinks to /article-%postname%/ and it will no longer effect category permalinks. it will still however … Read more
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
The problem with pagination was fixed by removing the wp_query loop and using the normal loop. <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php endwhile; endif; ?> The problem with the “load more” plugin was fixed by using the right classname to load the items. And change this in the php of the … Read more
There is a column in the term_relationships table for term_order which seems to imply that one could set the order of terms. That said, it looks like it doesn’t actually work — the core doesn’t use it in any way. A bit of poking around in wp_set_object_terms, the function that get’s used to assign terms … Read more
I made an example plugin based on Milo’s answer to show how you can use ajax to get a post and display it with colorbox. example.php: <?php /* Plugin Name: example */ function example_ajax_get_post() { $url = $_POST[‘url’]; $post = get_post(url_to_postid($url)); ?> <h2><?php print $post->post_title; ?></h2> <div><?php print $post->post_content; ?></div> <?php die(); }// end function … Read more
Note that you’re using a Custom Nav Menu, meaning that the contents of the menu can be customized. The easiest solution is simply to: remove the current “Our Doctors” page from the menu add your desired page to the menu edit the menu item to change the displayed title to “Our Doctors” save the menu
I got it by searching some more on google. ‘has_archive’ => true, This line is vital. Found out I had to rename my custom template pages to archive-“the custom type name” which in this case was. archive-case.php Because of this I could remove my “static” page called case and let the system pick the right … Read more
It sounds like you’re using “pretty permalinks” with %postname%. If so, you need to make sure that you don’t have page names that match your post type names. WordPress can only allow a particular slug to resolve to one page (that’s why you can only get one or the other to work at a time). … Read more