Skip to content

Instantly share code, notes, and snippets.

View tharlab's full-sized avatar
💭
I may be slow to respond.

Hary AK tharlab

💭
I may be slow to respond.
  • TharLab
  • east java
View GitHub Profile
@hivepress
hivepress / functions.php
Created April 27, 2022 09:11
Change the columns number of listings on the single vendor page #hivepress #vendors
<?php
add_filter(
'hivepress/v1/templates/vendor_view_page',
function( $template ) {
return hivepress()->helper->merge_trees(
$template,
[
'blocks' => [
'listings' => [
'columns' => 3,
@hivepress
hivepress / functions.php
Created April 27, 2022 09:02
Change maximum length of title and description for listings #hivepress #listings
<?php
add_filter(
'hivepress/v1/models/listing',
function( $model ) {
$model['fields']['title']['max_length'] = 123;
$model['fields']['description']['max_length'] = 123;
return $model;
}
);
@hivepress
hivepress / functions.php
Last active January 12, 2024 09:31
Hide the description field in the listing edit form #hivepress #listings
<?php
add_filter(
'hivepress/v1/forms/listing_update',
function( $form ) {
unset( $form['fields']['description'] );
return $form;
},
1000
);
@hivepress
hivepress / style.css
Last active January 5, 2024 15:29
Hide the Delete Listing link on the listing edit pages #hivepress #listings
.hp-template--listing-edit-page .hp-listing__action--delete,
.hp-template--listings-edit-page .hp-listing__action--delete {
display: none;
}
@hivepress
hivepress / functions.php
Created April 26, 2022 17:31
Add a custom item to the user account menu #hivepress #users
<?php
add_filter(
'hivepress/v1/menus/user_account',
function( $menu ) {
$menu['items']['custom_name_here'] = [
'label' => 'custom label here',
'url' => 'custom url here',
'_order' => 123,
];
@hivepress
hivepress / functions.php
Created April 26, 2022 16:58
Add first and last name fields to the user registration form #hivepress #users
<?php
add_filter(
'hivepress/v1/forms/user_register',
function ( $form ) {
$form['fields'] = array_merge(
$form['fields'],
[
'first_name' => [
'required' => true,
'_order' => 1,
@hivepress
hivepress / functions.php
Created April 26, 2022 16:13
Enable rich text (HTML) editor for the listing description #hivepress #listings
<?php
add_filter(
'hivepress/v1/models/listing',
function( $model ) {
$model['fields']['description']['editor'] = true;
return $model;
},
1000
);
@hivepress
hivepress / functions.php
Last active August 22, 2025 17:21
Change the maximum number of images per listing #hivepress #listings
<?php
add_filter(
'hivepress/v1/models/listing',
function( $model ) {
$model['fields']['images']['max_files'] = 123;
return $model;
},
100
);
@jcubic
jcubic / cdn.md
Last active April 6, 2026 16:41
How to setup a literally free CDN
@matter-it-does
matter-it-does / YoutubeHoverToPlay.md
Created November 4, 2021 11:22
Turn off youtube keep hovering to play popup popover