Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

TrueQAP trueqap

🎯
Focusing
Block or report user

Report or block trueqap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@trueqap
trueqap / style.css
Created Oct 31, 2019
DIVI fix cart icon on mobile
View style.css
#et-secondary-menu {
display: block!important;
}
@media screen and (max-width: 767px) {
#et-secondary-menu {
margin-bottom: 16px;
}
}
View .htaccess
<IfModule mod_headers.c>
<FilesMatch "\.(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$">
Header set Access-Control-Allow-Origin "*"
</FilesMatch>
</IfModule>
@trueqap
trueqap / divi.js
Created Sep 17, 2019
Divi social ikonok megnyitása új ablakban
View divi.js
<script type="text/javascript">
jQuery(document).ready(function($) {
$(".et-social-icon a").attr('target', 'blank');
});
</script>
@trueqap
trueqap / functions.php
Created Sep 1, 2019
WordPress Clone Role
View functions.php
<?php
add_action('init', 'kisker_role');
function kisker_role()
{
global $wp_roles;
if (!isset($wp_roles)) {
$wp_roles = new WP_Roles();
@trueqap
trueqap / style.css
Created Aug 30, 2019
WordPress hide links when the user is not logged in
View style.css
body:not(.logged-in) .example {
display: none !important;
}
@trueqap
trueqap / functions.php
Created Aug 16, 2019
Hide Divi project menu
View functions.php
<?php
add_filter( 'et_project_posttype_args', 'hide_divi_project', 10, 1 );
function hide_divi_project( $args ) {
return array_merge( $args, array(
'public' => false,
'exclude_from_search' => false,
'publicly_queryable' => false,
'show_in_nav_menus' => false,
'show_ui' => false
View schema.js
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "Cyberpunk 2077",
"image": "a te keped eleresi utvonala",
"brand": {
"@type": "Organization",
"name": "a weboldalad neve"
},
View ingyenes-szallitasi-kuszob-woocommerce.php
<?php
/**
* Plugin Name: Ingyenes szállítási küszöb - WooCommerce
* Plugin URI: https://github.com/trueqap/ingyenes-szallitasi-kuszob-woocommerce
* Description: A bővítmény segítségével kiírhatjuk a kosár oldalra, hogy mennyit kell még vásárolni az ingyenes szállításig.
* Version: 1.0
* Author: Trueqap
* Author URI: https://github.com/trueqap/
* License: GPL2
*/
View WordPress Own Posts Only
<?php
function posts_for_current_author($query) {
global $pagenow;
if( 'edit.php' != $pagenow || !$query->is_admin )
return $query;
if( !current_user_can( 'edit_others_posts' ) ) {
global $user_ID;
@trueqap
trueqap / domain_renamer.sql
Last active Jul 14, 2019
WordPress domain csere után futtatható mySQL parancsok. Segítségével átírhatjuk pár kattintással a régi webcímet az újra
View domain_renamer.sql
UPDATE wp_options SET option_value = replace(option_value, 'http://regiwebcim.hu', 'http://ujwebcim.hu') WHERE option_name = 'home' OR option_name = 'siteurl';
UPDATE wp_posts SET guid = replace(guid, 'http://regiwebcim.hu','http://ujwebcim.hu');
UPDATE wp_posts SET post_content = replace(post_content, 'http://regiwebcim.hu', 'http://ujwebcim.hu');
UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://regiwebcim.hu','http://ujwebcim.hu');
UPDATE wp_options SET option_value = replace(option_value, 'http://regiwebcim.hu', 'http://ujwebcim.hu');
You can’t perform that action at this time.