Generate multiple tag query URLs

$url = parse_url( $your_url ); $query = $url[‘query’]; $args_arr = array(); parse_str( $query, $args_arr ); if( isset( $args_arr[‘param’] ) ) { $query_string = $args_arr[‘param’]; $query_string .= ‘,value2’; } else { $query_string = ‘value2’; } add_query_arg( ‘param’, $query_string ); That’s completely untested, but you get the concept. Basically, wordpress is gonna want to replace what you … Read more

WordPress custom permalinks, pages are now 404

You need to setup your permalinks for menutype using custom rewrite rules. What you’ve done is apply the menutype prefix to everything, even though menutype isn’t relevant to everything, so things are being misinterpreted. You would need something similar to this: function custom_rewrite( $wp_rewrite ) { $feed_rules = array( ‘([^/]+)(/[0-9]+)?/?$’ => ‘index.php?menu_type=”. $wp_rewrite->preg_index(1).”&post_name=”. $wp_rewrite->preg_index(2) ); … Read more

get_posts displaying wrong permalink for “continue reading” link

You need to reset the post data after your get_posts loop since your calling setup_postdata. It would be better to remove the setup_postdata all together. global $post; $recent_posts = get_posts( $yourargshere ); foreach($recent_posts as $post) : $return = ‘<h4 class=”recent-post-title c0″>’ . $post->post_title . ‘</h4>’; $return .= ‘<p class=”recent-content c0″>’ . apply_filters( ‘the_excerpt’, $post->post_excerpt ) … Read more

Custom url for portfolio post type and for posts [duplicate]

try to set rewrite as parameter in $args register_post_type function. Sample: function codex_custom_init() { $labels = array( ‘name’ => _x(‘Books’, ‘post type general name’), ‘singular_name’ => _x(‘Book’, ‘post type singular name’), ‘add_new’ => _x(‘Add New’, ‘book’), ‘add_new_item’ => __(‘Add New Book’), ‘edit_item’ => __(‘Edit Book’), ‘new_item’ => __(‘New Book’), ‘all_items’ => __(‘All Books’), ‘view_item’ => … Read more

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