Articles of permalinks

Permalinks for custom post-types within custom taxonomies not found

I have tried to apply the advice offered by TheDeadMedic in this post to achieve the following URL structure: = a WP page = a custom archive = a custom post All URL’s work until the lowest one which returns a WordPress “not found” error. I don’t know whether I need to […]

Custom post type's get_permalink returns wrong url

Currently my permalink setting is /paper/%postname%/. I am developing a plugin, so the following is done during the activation. I am programatically adding a new custom-post-type called ‘meta’, like this (at ‘init’): register_post_type( POST_TYPE, array( ‘labels’ => array(‘menu_name’ => ‘meta’), ‘public’ => true, ‘rewrite’ => array(‘with_front’=>false,’slug’=>’meta’,’pages’=>false) ) ); Then in the activation I programatically added […]

WordPress rewrite my URL when i use pagination

I’ve just created a rewrite rules to integrate pagination in my page music (displaying custom post_type “music”) in order to : 1. displaying a specific page from a long musical playlist. 2. in this page, playing a specified track Here is the rule for pagination : add_rewrite_rule(‘music/page/([0-9])+/([^/]+)/?’, ‘index.php?pagename=music&paged=$matches[1]&trackid=$matches[2]’, “top”); But now when I enter : […]

Get a permalink structure of /%posttype%/%category%/%postname%

I have a custom post type named Reportage, added in functions.php: add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { register_post_type( ‘reportage’, array( ‘labels’ => array( ‘name’ => __( ‘Reportage’ ), ‘singular_name’ => __( ‘Reportage’ ) ), ‘public’ => true, ‘taxonomies’ => array(‘category’), ‘query_var’ => true ) ); register_taxonomy_for_object_type(‘category’, ‘reportage’); } Now I want to use this […]

custom post type and custom taxonomy url conflict

I have custom post type called paintings and it has a custom taxonomy called paintings_category. Currently I have this situation: A page using page-paintings.php Lists all landscape items in taxonomy.php Displays single painting post types, eg. single-paintings.php If I try changing the slug as below, I get a 404 error on: […]

Put a link to a category round a hard coded A HREF

In my footer I have hard coded the links and would like to link some to there category, I could just copy the full URL to it and paste in the href=”” but I would rather call it using php. My knowledge of WordPress and PHP is little and I have tried searching for something […]

Permalinks for Taxonomy and Custom Post Type

Have the following situation here: Custom post type: ‘recipes’ Taxonomy for custom post type ‘recipes’: ‘receitas’ One of the taxonomies slug: ‘receitas-whoopie-pie’ The permalink structure MUST be: (show all the posts of custom post type ‘recipes’ … it can be a page template if need) (show all posts of custom post type ‘recipes’ […]

Add specific word to default page permalink

Right now I am working on one of my client’s project. Its all about amazon product display. My client wants me to change the permalinks of all posts, pages, serch results, archive pages, categorypages, all custom post type pages. I am very new to Rewrite API. I have read the documentation provide on wordpress codex […]

Problem duplicated shortlinks bitly

I’ve this plugin to create shortlink using the bitly API, but there’s a problem! function yoast_bitly_shortlink($url, $id, $context, $allow_slugs) { if ( ( is_singular() && !is_preview() ) || $context == ‘post’ ) { $short = get_post_meta($id, ‘_yoast_bitlylink’, true); if ( !$short || $short == ” ) { if ( !defined(‘BITLY_USERNAME’) || !defined(‘BITLY_APIKEY’) ) { $short […]

How to find out who handles a permalink?

My previous question isn’t faring too well. I guess it may be too specific. Let me approach the problem from another direction. There’s an URL within my WordPress site. It’s occupied – sending the visitor to some resource. How can I identify the type of resource is associated with this URL, and then find the […]