POPULAR ARTICLES
Opencart 3 – Own settings fields in the admin panel. Display...
Sometimes on the site you need to display some additional data that is not in the admin panel. For example, add new phone numbers,...
Custom api route for updating ACF fields in WordPress
Let's write our own custom api route to update ACF fields. The api request will have two handlers - POST and GET. GET -...
- Advertisement -
LATEST ARTICLES
Shiba inu token review – forecast for 2024
Shiba inu (SHIB) is a token created by an anonymous team in August 2020. The developers positioned the new meme currency as a continuation of another meme digital token inspired by them - DOGE....
Pepe coin (PEPE) cryptocurrency review
Pepe coin is a meme cryptocurrency created on the Ethereum blockchain that became popular in 2024. Currently, Pepe is among the top 50 most traded currencies in the world.
The Pepe Coin currency was created...
How to get main category by product id Yoast SEO
If in an online store written on the WooCommerce plugin, you need to get the main (main) category by product id (Yoast SEO), you can use the following code:
$cat = 0;
$taxonomy = 'product_cat';
$primary_cat_id=get_post_meta($product->id,'_yoast_wpseo_primary_' ....
Submitting an Ajax form in Laravel
Let's create a form without reloading the page on the Laravel framework using ajax technology. First, let's write the routes in web.php
// New page with form - output
Route::get('/feedback', array(
'as' => 'site.index.feedback',
'uses' => 'IndexController@feedback'
));
// Ajax...
Find phone numbers in divs via JS and make them links
Suppose there is an html layout where you need to make all phone numbers links and add a class to each link:
<div>
<ul>
<li>+375007778899</li>
<li>+375007778822</li>
<li>+375007778811</li>
</ul>
</div>
Let's run the js script using jQuery:
jQuery(document).ready(function($) {
$('.phones').html( $('.phones').html().replace(/(+d+)/g,'<a href="tel:$1">$1</a>') );
});
After executing the...
















