Skip to content

Magenaut

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

php

WP_QUERY post_in problem

August 5, 2022August 4, 2022 by Magenaut

why when i using this code :

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

Update Multiple Post Meta for the Same Post In One call?

August 5, 2022August 4, 2022 by Magenaut

How can I update multiple fields/Custom fields for the same post using only one call?

Categories Q&A, Wordpress Tags php, plugin-development, plugins, post-meta, theme-development Leave a comment

Rename a folder via HTML POST request

August 5, 2022August 4, 2022 by Magenaut

I am trying to rename a folder in the uploads folder if an HTML form is submitted (used to edit entry names).

Categories Q&A, Wordpress Tags customization, php, plugin-development, plugins, theme-development Leave a comment

How to use wp_ajax_set_post_thumbnail?

August 5, 2022August 4, 2022 by Magenaut

I have the link of WordPress doc about this function, but there is nothing explaining how to use this. I have a Ajax function, PHP and a HTML input. In this HTML I set the title and content, and I’d like to set the thumbnail too. Maybe I can do that with this function? Is there some example?

Categories Q&A, Wordpress Tags ajax, html, javascript, jquery, php Leave a comment

Non-blocking file_put_contents in function.php

August 5, 2022August 4, 2022 by Magenaut

I have a function in function.php which is called on save_post. Currently, when the user is publishing or updating a post, this function will execute but it will take a lot of time.

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

How to append to an array and return the results in a filter?

August 5, 2022August 4, 2022 by Magenaut

i am trying to get array in filters in wordpress i dont khnow how to do it.

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

How to assign a specific service to a specific provider based on location

August 5, 2022August 4, 2022 by Magenaut

I’m looking for a way to assign a specific service to a specific provider based on location. I’m currently developing a website with various service providers providing the same service.
Do we have a way to achieve this using woocommerce?
Thanks

Categories Q&A, Wordpress Tags customization, functions, php, plugins, woocommerce-offtopic Leave a comment

How to replace file_get_contents() with a WordPress Filesystem call

August 5, 2022August 4, 2022 by Magenaut

I’m using the PHP file_get_contents() function to retrieve and echo the contents of an SVG-file.

Categories Q&A, Wordpress Tags filesystem, php, wp-filesystem Leave a comment

Check $post->ID against multiple values

August 5, 2022August 4, 2022 by Magenaut

i have the following snippet on the site which is working perfectly fine but sometimes I have multiple pages where I want to trigger the event snippet from google, my questions can I add multiple ids using comma?

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

Having trouble creating two shortcodes, one for logged in user and one for visitors

August 5, 2022August 4, 2022 by Magenaut

So I’m trying to create a code (in functions.php) that displays a widget content, from shortcode, based on whether the user is logged in or logged out (visitor). I am successful in displaying content for logged in users, but not for visitors, as I need everything to happen in the same widget. The approach I’m trying is by using two different shortcodes, like this:

Categories Q&A, Wordpress Tags customization, functions, login, php, shortcode Leave a comment
Older posts
Newer posts
← Previous Page1 … Page22 Page23 Page24 … Page35 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