Skip to content

Magenaut

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

functions

PHP multiple forms, same page, isset($_POST[]) not working?

August 4, 2022 by Magenaut

I have a page with a list of webinars, and a shortcode that displays a form button labeled “Enroll”. The form should simply update the user’s WordPress profile and redirect them to a page. I don’t understand why I’m not getting this to work:

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

How can I use Woocommerce $product->get_attribute in functions.php? (if at all)

August 4, 2022 by Magenaut

I am trying to use:
if ( $product->get_attribute( ‘pa_orientation’ ) == ‘vertical’) {
// do something
}

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

If has action not working as expected

August 5, 2022August 4, 2022 by Magenaut

I’m using ACF Blocks in a theme I’m building.

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

shortcodes, custom php and their errors

August 5, 2022August 4, 2022 by Magenaut

UPDATE- After some suggestions I changed this over to using the $wpdb API. The following code is retuning a ‘1’ instead of the actual result count which should be ‘2’.

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

Adding multiple conditional tags in a function?

August 5, 2022August 4, 2022 by Magenaut

I have about 30 categories that need to be included within this function list:

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

Function is printing twice – any suggestions?

August 5, 2022August 4, 2022 by Magenaut

My function is returning the results correctly, but for whatever reason it is returning them twice. Any suggestions? It’s for a shortcode that queries and lists custom post types matching custom taxonomies.

Categories Q&A, Wordpress Tags functions, posts, shortcode, wp-query Leave a comment

Remove extract from function

August 5, 2022August 4, 2022 by Magenaut

I am using this code so that users can input [photo no="1"], [photo no="2"], [photo no="3"] etc.. in their posts. However I heard that extract is an unsafe function to use. How could I modify this code to remove extract?

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

Setting posts_per_page for taxonomy term template

August 5, 2022August 4, 2022 by Magenaut

I have a custom taxonomy term page set up to display posts associated with that term (taxonomy-insight_type-academia.php). I figured I could use the following to limit the posts on that page based on code found here:

Categories Q&A, Wordpress Tags functions, posts, taxonomy, templates, terms Leave a comment

Excerpt – First Sentence & Read More

August 5, 2022August 4, 2022 by Magenaut

I am using this function to limit the excerpt to the first sentence…

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

Shortcode Attributes to Return different $_POST

August 5, 2022August 4, 2022 by Magenaut

I am creating a solution to enable front end editing of custom fields, I am using hidden input containing the custom field to send via POST request to an editing form, the form contains default value in the form of shortcodes to render the correct $_POST received.

Categories Q&A, Wordpress Tags functions, plugin-development, plugins, shortcode, theme-development Leave a comment
Older posts
Newer posts
← Previous Page1 … Page9 Page10 Page11 … Page25 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