If you’re using the category archive template you do not need to create a new WP_Query instance. Just filter the main query using pre_get_posts()
.
Put this in functions php or a plugin:
add_action( 'pre_get_posts', wp_se_pre_get_posts' );
function wp_se_pre_get_posts( $query ) {
if ( is_admin() || ! $query->is_main_query || ! is_category( 'pressmeddelande' )
return $query;
$query->set( 'posts_per_page', 6 );
}
Related Posts:
- Multi Site Search Pagination is Broken
- Multisite pagination with get_posts
- Plugin for editing options on multisite?
- How to share WordPress core library
- wp-activate.php causing white screen of death
- Change wordpress Multisite default site from side id 1 to side id 2
- How can I have network sites not use year/month folders by default?
- 4 single sites VS multisite wordpress
- How to prevent hotlinking with htaccess in WordPress and why most common use about it doesn’t work?
- Why can’t a WordPress network (multisite) in it’s own folder use subdomains?
- Two-level multisites in WordPress
- Display custom homepage text based on domain
- Add new domain to ‘My Sites’ using network admin
- Is there an advantage of using multisite if I have multiple WordPress websites for myself?
- How do I set a default theme in multisite network
- WordPress Multisite Login Access
- Switch_to_blog() outside wordpress
- Jetpack Blog Subscriptions on Multisite [closed]
- current_user_can(‘Administrator’) does not return true in multisite if user is Administrator but NOT Super Admin
- How to remove the Tools menu item from the WP-Admin menu
- cant enable theme in multisite
- Using $wpdb Class to Pull Recent Comments Across a Network
- Default content for a new site in multi site
- Proper Network Activation problem has been fixed in wp 3.3.1 or not?
- On WordPress Network(multisite), Sub Blogs in Subdirectories or Subdomains? What’s better?
- wordpress htaccess is hijacking my .mp4 files
- Is there a way to separate a site inside a network (multisite) into its own wp site?
- How to know if a site is using Multisite?
- Has WP and MU fully merged?
- Why is ‘is_multisite’ returning true when it’s a single install?
- How can I delete a user from entire multisite nework
- Using A Shared/Common Theme Across Multiple Sites
- Forcing SSL Protocol for Multisite Subdomain Child Sites + cPanel Configuration
- Website DR using Multisite
- Multisite Network menu links not updating
- Activate Child Theme with Codex
- multisite hook for Add Existing User
- WPML tables not deleted when removing multisite subsite, need help clearing up my sql-file! [closed]
- Why does my multisite blog doesn’t show users?
- access the plugins for each role in WordPress multisite
- What sites are you registered to when joining a multisite?
- ERR_TOO_MANY_REDIRECTS IN MULTISITE NETWORK DASHBOARD
- How to redirect one page on the subdomain
- WordPress Multisite new sites in directory
- How to configure Multisite Network with randomized hostnames?
- wp_insert_site() is triggering database error in a unit test
- Multisite: How to get a list of installed languages
- “You must be logged in to comment” but I am already logged in
- Is the Multi site functionality a viable option for Country and Language targeting?
- WordPress multisite .htaccess causes 500 error on old *.php URLs
- Site redirecting to http://example.com/wp-signup.php?new=example.com
- Change main site in multisite install?
- Enable “My blogs” in a custom installation
- HTTPS Warning and Certificate Error when Updating Network
- Multisite, with virtual root
- Domain Mapping for WordPress MU and https redirection – How to?
- Move wp-content htacess
- Complex WordPress Website
- WordPress MU subdomain vhost
- How to retrieve Post Excerpt from a different site in the Network
- How to temporarily redirect front page of a network to one of the sites/blogs?
- Multisite: Redirect to appropriate domain if subdomain doesn’t exist
- How to change a user role after registering in multisite?
- Multisite questions
- How do I stop exactly one blog from network ever setting cookies?
- WordPress multisite with domains and subdomains
- Two Websites with the same administration Panel In WordPress
- Creating a multilingual multisite
- Hiding media uploaded by other users in wordpress multisite?
- Handling embedded videos in excerpts
- Multisite Create New Blog Plugin
- Configure WordPress Multisite Pages with Custom Permalinks
- How can I have two or more WordPress Pro (paid) themes that form a single website?
- Multisite WordPress on a site that is more than 30 days old
- On a multisite environment, get the subdomain value as variable
- How can ı change my logo for specific page?
- Automatic registration on main site upon user registration on Multisite
- Displaying Multisite ID number
- Multisite installation steps?
- Pass form inputs to page content
- Shared upload folder in wordpress multisite with custom sub site domain pictures URL:s
- In Multisite: Site / Blog IDstill exists after deleting site
- New domain in multisite environment
- Domain Mapping with WPMU
- Why does this multisite redirection loop vanish when I add “www.”?
- Using both subdirectory and subdomains in Multisite
- Is Multisite the RIGHT option for my case?
- Setting up multisite with NginX
- Multiple domain with one database
- Default sub-pages on WordPress Multisite
- WordPress Multisite – Questions about select all posts from all network sites
- Run “get_the_post_thumbnail” with a different table prefix?
- Comment reporting for Multisite
- How to display the most popular posts of all the blogs in a mu setup? [duplicate]
- WordPress MS wp-admin/includes/post.php error with shortcode generator
- Subdomain add comment redirect to 404 not found page iis server
- All links to images are broken in a subdomain multi site environment
- WordPress Multisites
- The wpmu_blogs_columns filter is not working
- Map WP Multisite blog.example.com to anotherdomain.com/blog?