Skip to content

Magenaut

  • Home
  • Topics
    • Notes
    • Tutorial
    • Bug fixing
    • Extension
    • Server
  • Q&A
  • Privacy Policy
  • About

Q&A

Different ‘posts_per_page’ setting for first, and rest of the paginated pages?

August 4, 2022August 3, 2022 by Magenaut

How do you set the posts_per_page query setting so that a different number of posts are displayed on the first of the paginated pages (of home, archive, search, etc.) and the rest of them?

Categories Q&A, Wordpress Tags offsets, pagination, wp-query Leave a comment

How do you store options with a:n:{{}} syntax in wp_options?

August 4, 2022August 3, 2022 by Magenaut

I’m checking out how a particular plugin works and noticed that it stores its data for option_value in wp_options in this array format…

Categories Q&A, Wordpress Tags plugin-development Leave a comment

How to Override a Pluggable Function

August 4, 2022August 3, 2022 by Magenaut

How can I override a function in pluggable.php?

Categories Q&A, Wordpress Tags plugins Leave a comment

get_adjacent_post alternative on a very large db

August 4, 2022August 3, 2022 by Magenaut

I’m using get_next_post and get_previous_post (from the same category) to show the thumbnail and link to the respectives posts in my single template, but it’s in a very large db that is giving my server a hard time.

Categories Q&A, Wordpress Tags next-post-link, performance, previous-post-link Leave a comment

How to remove images from showing in a post with the_content()?

August 4, 2022August 3, 2022 by Magenaut

Trying to learn more about creating my own themes and not using any plugins I wanted an ability to display all the images in a post excluding the thumbnail in my single-foobar.php file and I can do that with:

Categories Q&A, Wordpress Tags attachments, images, posts, text Leave a comment

WordPress Multiple Category Search

August 4, 2022August 3, 2022 by Magenaut

From few months I am digging into wordpress for multiple category search options, and finally came up with this.

Categories Q&A, Wordpress Tags categories, customization, search Leave a comment

Exclude the category from the WordPress loop

August 4, 2022August 3, 2022 by Magenaut

I have this code for the loop, and I need to exclude a category 4 from this loop. Any suggestions on how to achieve this?

Categories Q&A, Wordpress Tags categories, exclude, loop Leave a comment

Filtering categories in the permalink structure

August 4, 2022August 3, 2022 by Magenaut

Using /%category%/%postname%/ for the permalink I get a URL string of all the categories that the specific post is included in.
I would like the categories in the url to be filtered down to only one branch of the categories structure, and starting not from the root parent category.

Categories Q&A, Wordpress Tags categories, permalinks, seo, url-rewriting Leave a comment

Update post counts (published, draft, unattached) in admin interface

August 4, 2022August 3, 2022 by Magenaut

I am working on a multi-user WordPress setup and have made it so a particular type of user can only see and interact with posts, images, pages etc that they have authored. The code to make this happen looks like this:

Categories Q&A, Wordpress Tags admin, filters, permissions, posts, users Leave a comment

Tutorials for Unit-Testing in WordPress and for unit-test.svn.wordpress.org?

August 4, 2022August 3, 2022 by Magenaut

I’m starting to learn Selenium and PHPUnit and I am interested in implementing what I’ve learned in my WordPress projects. I’ve seen http://unit-test.svn.wordpress.org and wonder if there are any tutorials or core-developer’s notes on how to use it?

Categories Q&A, Wordpress Tags debug, testing Leave a comment
Older posts
Newer posts
← Previous Page1 … Page2,381 Page2,382 Page2,383 … Page2,571 Next →
  1. michealSmith07 on Is there a way to dynamically refresh the less command?August 21, 2022

    That is a very nice post. I like this post.

  2. anonymous on Fix libwacom9 dependency issue when upgrade DebianJune 27, 2022

    saved my day!! Thanks for the help…

  3. sreedhar on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    Thanks its working

  4. saintnick on Fix libwacom9 dependency issue when upgrade DebianMay 10, 2022

    remove libwacom2 worked for me as well

  5. ranafoul on Fix libwacom9 dependency issue when upgrade DebianApril 22, 2022

    apt remove libwacom2 helped on kali 2022.01. gr8

.net ajax asp.net asp.net-core asp.net-mvc asp.net-mvc-3 asp.net-mvc-4 asp.net-web-api bash c# command-line css custom-post-types custom-taxonomy dataframe dictionary django entity-framework functions gridview html iis javascript jquery json linux list matplotlib numpy pandas php plugin-development plugins posts python python-2.7 python-3.x security shell shell-script sql string vb.net webforms wp-query

© 2026 Magenaut • Built with GeneratePress