Skip to content

Magenaut

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

functions

Running script based on Category

August 5, 2022 by Magenaut

I have a child theme with function.php where I am running a script in the header but now I want to tweak it to run only on posts listed under one category and avoid on homepage or other categories. Here is my existing code which I modified but it is firing the script on the entire website.

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

Is $hook a global variable in WordPress

August 5, 2022 by Magenaut

// only run on dashboard page if ( 'index.php' != $hook ) { return; } There is a plugin on the WordPress.org repository that checks PHP current version. I happened to read its code and came across the above code. the comment tells everything that only runs on the Dashboard page. But is $hook a … Read more

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

Need to replace Currency Shortforms

August 5, 2022 by Magenaut

I want to replace the currency shorten alphabet, it is currently in M, L and So on.
I want to change to indian currency number format like K, L and CR

Categories Q&A, Wordpress Tags function-exists, functions, php, pluggable, plugins Leave a comment

Header menu aligned right on all pages except for single-post page

August 5, 2022 by Magenaut

I have a header with a logo, menu items and a search bar. I have aligned the menu on the right (close to the search bar), but in the ‘single-post’ page, the menu items appear on the left, starting right after the logo. The header HTML is the same for each page (I’m getting it … Read more

Categories Q&A, Wordpress Tags customization, functions, menus, themes Leave a comment

require get_template_directory() . ‘path/to-my/file.php’ BREAKS customize > themes functionality

August 5, 2022 by Magenaut

hope to get some help, please <3

Categories Q&A, Wordpress Tags functions, include, php, theme-customizer, theme-development Leave a comment

Create custom function for hero image

August 5, 2022 by Magenaut

I’m newbies with php development and I want create a custom functions

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

Remove a category from a post when saving a new post

August 5, 2022 by Magenaut

I’m having problems with my code. I’m trying to remove a category from a post that’s using that category and then adding that same category when saving a post.

Categories Q&A, Wordpress Tags categories, functions, save-post, terms Leave a comment

How to make applyFilters function return false via functions.php

August 5, 2022 by Magenaut

So I have a following code inside the plugin:

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

Customize “the_posts_pagination” and put list instead div

August 5, 2022 by Magenaut

Hello everybody, I need help with my custom wordpress pagination.

Categories Q&A, Wordpress Tags functions, hooks, pagination, twitter-bootstrap Leave a comment

Adding tawk.to code just before body tag on functions.php file

August 5, 2022 by Magenaut

I would like to add tawk.to widget script just before the body tag. I would like to add the code to the functions.php file of my child theme. How can I do this? A code sample will assist a long way. The following is my code:

Categories Q&A, Wordpress Tags child-theme, functions, javascript, php, wp-enqueue-script Leave a comment
Older posts
Newer posts
← Previous Page1 … Page6 Page7 Page8 … 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