Skip to content

Magenaut

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

Q&A

How to use a custom post type archive as front page?

August 4, 2022August 3, 2022 by Magenaut

I’d like to use a custom post type archive as a site’s front page, so that

Categories Q&A, Wordpress Tags custom-post-type-archives, custom-post-types, functions, wp-query Leave a comment

restore_current_blog() vs switch_to_blog()

August 4, 2022August 3, 2022 by Magenaut

After every instance of switch_to_blog() you should call restore_current_blog() to restore the current (actually, previous) blog.

Categories Q&A, Wordpress Tags multisite Leave a comment

Assign Page Template Within A Custom Post Type

August 4, 2022August 3, 2022 by Magenaut

I have registered a Custom Post Type and created a file called archive-myCPT.php and another one for single posts called single-myCPT.php.

Categories Q&A, Wordpress Tags custom-post-type-archives, custom-post-types, customization, page-template Leave a comment

Get excerpt using get_the_excerpt outside a loop

August 4, 2022August 3, 2022 by Magenaut

I have a code that call get_the_title() and it works, but get_the_excerpt() return empty. How can i make it work?

Categories Q&A, Wordpress Tags excerpt, loop Leave a comment

Allow HTML in excerpt

August 4, 2022August 3, 2022 by Magenaut

Here is my excerpt code.

Categories Q&A, Wordpress Tags excerpt, php Leave a comment

how to limit search to post titles?

August 4, 2022August 3, 2022 by Magenaut

Is there a way to limit search to post titles? I know I can modify query.php core file but there must be a way to do it with hooks right?

Categories Q&A, Wordpress Tags actions, hooks, search Leave a comment

How do themes provide support for child themes?

August 4, 2022August 3, 2022 by Magenaut

One of the requests on themeforest is that themes are required to provide child theme support.

Categories Q&A, Wordpress Tags child-theme Leave a comment

Restricting a Plugin to Only Load its CSS and JS on Selected Pages?

August 4, 2022August 3, 2022 by Magenaut

I’d like to cause a plugin to restrict its loading of CSS stylesheets and JavaScript JS files to only those pages for which they are needed.

Categories Q&A, Wordpress Tags css, performance, plugins, server, server-load Leave a comment

How can I edit post data before it is saved?

August 4, 2022August 3, 2022 by Magenaut

I have a plugin and I would like to be able to run the post content through some filters before it is saved to the database. From looking at the plugin api, I see that two hooks that look like they might be helpful:

Categories Q&A, Wordpress Tags actions, customization, filters, hooks, plugins Leave a comment

exposing attachment uploading to the front end — delicate

August 4, 2022August 3, 2022 by Magenaut

i’m probably breaking a few common sense rules here.

Categories Q&A, Wordpress Tags attachments, uploads Leave a comment
Older posts
Newer posts
← Previous Page1 … Page2,317 Page2,318 Page2,319 … 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