Link to a latest news item with correct url

You need to create a page of post. It is quick and very easy HERE IS HOW STEP 1 Copy your page.php template and rename it to something like page-pop.php STEP 2 Open up the template and add the following header right at the top to tell wordpress it is a page template <?php /** … Read more

Gettind 404 not found wen click the view button for a given category custom post type portfolio

There is a conflict with the taxonomy slug and custom-post-type slug. You are keeping both same. There are two options: 1) Either remove the rewrite => $rewrite from the taxonomy array and make it like this $labels = array( ‘name’ => _x( ‘Portfolio Categories’, ‘Taxonomy General Name’, ‘owd’ ), ‘singular_name’ => _x( ‘Portfolio Category’, ‘Taxonomy … Read more

htaccess redirect for all categories converted to tags now showing 404

Heree’s a code solution, not htaccess. This first checks if current query is for a category page, then checks category existence, and if category not exists but a tag with the same name, it redirects to the tag page. add_action(‘parse_request’, ‘wpse_parse_request’); function wpse_parse_request( $r ){ if( isset($r->query_vars[‘category_name’]) ) { $cat = get_term_by(‘slug’, $r->query_vars[‘category_name’], ‘category’); if( … Read more

Hide all posts by an author

A filter on pre_get_posts should do it. function hide_author_wpse_138491($qry) { $exc = 123; if ( !is_admin() && !is_singular() ) { $qry->set(‘author’,’-‘.$exc); } } add_action(‘pre_get_posts’,’hide_author_wpse_138491′); This should exclude results from the author with ID = 123 on all front end pages except for “single” pages, which sound like what you are aiming for– ie, to “completely … Read more

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