How to use a custom field with add_rewrite_rule()?

You should use ‘post_type_link’ hook and register post type ‘project’ with (‘with_front’ => true) parameters ‘rewrite’ => array(‘slug’ => $slug, “with_front” => true), ==================================or===================================== add_rewrite_rule(‘^project/([0-9a-z]+)/?$’, ‘index.php?project=$matches[1]’, ‘top’); ==================================================================== function post_type_link_hook($link, $post) { add_rewrite_tag(‘%url_id%’,'([^&]+)’); if (‘projects’ == get_post_type($post)) { $urlId = get_post_meta($post->ID, ‘url_id’, true); //Lets go to get the parent cartoon-series name return str_replace(‘%url_id%’, $urlId, $link); … Read more

get wordpress post loop by meta box date

Have you tried passing in the $args variable to query_posts, rather than $guide? query_posts($args); Also, you should be looking to create the custom query using WP_Query class and not the query_posts. See this answer for more details (https://wordpress.stackexchange.com/a/1755) Try the below code: $args = array(‘post_type’ => ‘post’, ‘meta_key’ => ‘meta_date’, ‘meta_value_num’ => , ); $my_query … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)