I have the following code that works and need to Replace the existing category with AFC images this scrolls but now the default images are in their place first screenshot of admin panel frontend screenshot how can I remove the default once Answer Just remove default one Add this in to your theme functions.php
Tag: php
Is it legal omitting braces in inline PHP? [closed]
Closed. This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 8 months ago. Improve this question With braces: <input type=”text” name=”text̶…
How can i customize laravel middleware ‘auth:api’?
I want to customize my auth middleware that secure my endpoint. for example, i want to accept requests that have specific bearer token. how can i do? i’m using dingo api library. Answer Go to kernel.php file in HTTP directory. You’ll see something like this. Find the ExampleClass and read its hand…
What does the annotation @template mean in PHP doc blocks?
I could see this PHPDoc block in the FakerPHP/Faker package, and I’m not aware what does @template mean? you can find it in the package’s main branch on this line Answer The @template annotation relates to a concept called Generics, which does not currently exist in PHP, but are a way of dynamical…
Laravel Eloquent return conditionally when first condition not exists return another
i use Eloquent for get Multilanguage post title. this return english title, but some times the english title not exist so i want to return title in another language . i mean when use getTitle_en to get engish title ([‘cat’ => ‘title’, ‘meta_name’ => ‘en’])…
Laravel yajrabox relation sort
I have a project with laravel and datatable using yajrabox, it stuck in relationship sort this is my kabupaten datatable class and this is my action column. provinsi model and kabupaten model my question are why $id in kabupaten.action return provinsi.id instead of kabupaten.id and i have try The $id return k…
Laravel could not find driver Cpanel
I deployed my Laravel project on Cpanel but there’s an error “could not find driver(SQL)” I’m using Mysql database in Cpanel, and I have checked pdo_mysql in PHP extension. but when I looked on phpinfo(); and find pdo_mysql, the result is 0/0 How to fix this? Thanks in advance Answer T…
ZipArchive::addFile() creates zip files with tree structure in Windows but flattened in Linux
I used PHP’s ZipArchive library to create a zip file to easily transfer images for some e-shop synchronization service from a desktop to the web server of the e-shop. The script I used to create the zip is below: My problem is that when you view the zip’s contents in WinRAR, they are shown normall…
Fetch data from one table and compare with another one basic on contain values
I got 2 different databases and 2 tables Here’s Table.1: and there’s Table.2 but the users ask for all items separately according searching the ranking.values using Table.2 and compare with Table.1 How can I use Sql command having the result when something like : login as user2 so I would get but …
Is there a way for PHP to check if there is a number behind the
Is there a way for PHP to check if there is an number after the . in a variable? for example: $x=4.5 and now i want PHP to check if its a round number or one with a number after the . like shown in $x. I made a script where i want PHP to devide my Variale by 2