Skip to content

Magenaut

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

php

Set site title & tagline with wp.config or function.php

August 5, 2022August 4, 2022 by Magenaut

Currently I can change Site Title & Tagline in Settings >> General but someone attack and remove it.

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

How to get post titles by post ID and integrate with my code?

August 5, 2022August 4, 2022 by Magenaut

I have function which gets menu next and previous item url. I want to get also title for them. How can I do this? This is what i have :

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

Display a list of posts corresponding to a category

August 5, 2022August 4, 2022 by Magenaut

I have this code that is displaying a list of my blogposts on my index.
What I would like is to add a category parameter to it, to only display a list of the posts with a specific category.
I don’t seem to be able to do it, without breaking everything…

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

How to add active class dynamically

August 5, 2022August 4, 2022 by Magenaut

How to add active class dynamically**I use this code but not working **

Categories Q&A, Wordpress Tags php Leave a comment

Remove duplicates from echo output in PHP

August 5, 2022August 4, 2022 by Magenaut

Right now the below function outputs all variations images of a product. E.g. 3x blue (size S, M, L), 3x red (size S, M, L) I would like the below function to only output unique color images. E.g. 1x blue, 1x red Tried to use array_unique in the echo string but could not get it … Read more

Categories Q&A, Wordpress Tags php Leave a comment

Targeting single page with JS

August 5, 2022August 4, 2022 by Magenaut

I created a JS and PHP code to query a database and display matching rows on a page. It was messing up other pages on WP, so I wanted to know how to target a single page so the JS doesn’t run on other pages.

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

Trying to add some custom text into WordPress Post title via function.php

August 5, 2022August 4, 2022 by Magenaut

I need to add a custom text in wordpress Post title dynamically which I’m trying to add via this code in function.php

Categories Q&A, Wordpress Tags functions, javascript, php, variables, wp-title Leave a comment

Custom post type permalink returns bad url

August 5, 2022August 4, 2022 by Magenaut

I have problem with custom post type. In BO url’s are ok example: page.pl/post_type_name/post_title.
When I try use get_the_permalink() or the_permalink() it return url like:
/?post_type=cpt_wydarzenia&p=258

Categories Q&A, Wordpress Tags custom-post-types, html, php Leave a comment

How to specify the path for require_once in a child theme?

August 5, 2022August 4, 2022 by Magenaut

I have a child theme folder called themes/child-theme and inside I have a file dashboard_payments.php.
Under the child theme folder I’m creating a new folder called gateway and inside there’s a config.php.

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

Undefined offset: 3 in custom function

August 5, 2022August 4, 2022 by Magenaut

I am using this code as part of a function:

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