Check for the existence of term slug
Check for the existence of term slug
Check for the existence of term slug
Previous answer here. You’ll want to use str_replace $permalink = get_the_permalink(); $permalink = str_replace(“dog-“, “”, $permalink);
How to prevent post_name from incrementing in wp_insert_post?
Here’s what I think is causing the problem: <?php query_posts($query_string . ‘&cat=-98, 101, 102’); ?> should be: <?php query_posts($query_string . ‘&cat=-98,-101,-102′); ?> The way it is now, it’s telling WordPress re-run the old query, but give me nothing from category 98, AND only pull posts from categories 101 and 102. I’m guessing you want it … Read more
OK, I almost got it now… I extended the Walker_Page Class: class Walker_Child_Classes extends Walker_page { function start_el(&$output, $page, $depth, $args, $current_page) { if ( $depth ) $indent = str_repeat(“\t”, $depth); else $indent=””; extract($args, EXTR_SKIP); $output .= $indent . ‘<li class=”‘ . apply_filters( ‘the_title’, $page->post_name, $page->ID ) . ‘”><a href=”‘ . get_page_link($page->ID) . ‘” title=”‘ … Read more
Take a look at this plugin -> http://wordpress.org/extend/plugins/redirection/
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
After doing some research I found following code, made it a plugin (you have to create a php file and give it a name,copy code below into that file and place it in your plugins folder). It is not my code so therefore I put references to the author and original source-code and links to … Read more
This code is used after <head> and before <body> and is supposed to get current page’s slug. It works great, however it will get the slug of first blog post when on “general” blog page. $post is going to be set to the first post in the Loop when the page loads. On “page” pages … Read more
Disable the WordPress event plugin. Use following code in functions.php to find your theme has events function. if ( post_type_exists( ‘events’ ) ) { echo ‘the Event post type exists’; }else{ echo ‘the Event post type does not exists’; } If you find theme has events custom post type, find where your theme register the … Read more