I need to able to insert the id of the post in the post title. The id should be added to the title everywhere the title appears. It should only be added to posts with post type post and not added to pages, custom post types etc. I’ve managed to get this far: Which returns the post title and the
Tag: php
Shopware 5.6 override class method
I want to override method ajaxAddArticleCartAction in engine/Shopware/Controllers/Frontend/Checkout.php, cuz i want a bit complicated logic on accessories quantity calculation. My question is: Is it possible to override this method in my custom plugin. With other words, if i add product in cart, i want to use…
How to enable mcrypt php extension on xampp linux
I have installed xampp on my ubuntu machine through the installer having php version 7.2.4 Recently I need to enable Mcrypt PHP extension but I did not find it on php.ini file. I have tried to …
Header issue does not load the right one
Hi so i have couple of headers that have different menus for different users and my code is if (isset($_SESSION[“role”])== “engineer” or isset($_SESSION[“role”])!=”…
timber/twig how to pass `posts` php-object to JavaScript? Some values are lost
When I’m trying to pass the information contained in {{posts}} I cannot retrieve all of it, at least not the post.link information {% for post in posts %} var t = JSON….
How to get user other data when they login in with thier username?
I’m a newbie in programming. I want to ask is there any way I can get user’s data from MySQL in another page when they login in only with their username and password. What I’m facing is I have a …
How to restrict content from Users with Specific roles in WordPress?
i want to hide ads for logged in user (subscribers). im using a plugin called “private” that generates shortcodes. i found the code i should use but dont know how to put it in my single.php. My single post is custom made so i cant use the rich editor. the one i want to use… [private role=”su…
Google Calendar API PHP | GOOGLE_APPLICATION_CREDENTIALS: file xxx.json does not exist
I’m pretty new at this but I’ve been trying to use the google calendar API to show upcoming events on a website I’m making. So far I’ve enabled the API and created a service account to access the …
Set a custom shipping cost on every 10th Order in WooCommerce
WP 5.3.3 I need to change shipping cost programmatically, after order creation. This code doesn’t affect: add_action(‘woocommerce_new_order’, ‘custom_shipping_costs’, 1, 1); function …
PHP(32-bit) 2GB Range Download
I have the following problem: I have a php webpage which: is running on a raspberry pi(32bit) should deliver files for download which are bigger than 2 GB files are access protected, which means, …