Archives: Snippets
Add WPCode Custom Field Smart Tag
add_filter( ‘wpcode_smart_tags’, function( $tags ) { $tags[‘custom’] = array( ‘label’ => ‘Custom’, ‘tags’ => array( ‘custom_field_tag’ => array( ‘label’ => ‘Custom Field Tag’, ‘function’ => ‘wpcode_custom_field_tag’, ), ), ); return $tags; } ); function wpcode_custom_field_tag() { // Replace custom_field_tag below…Continue reading
solal avis
[trustindex data-widget-id=d49c9ab11044550b8436852bdb3]Continue reading
WPCode Admin Number of Snippets
add_filter( ‘wpcode_snippets_per_page’, function() { return 5; });Continue reading
Header and Footer
IDK…
Forum
// create new element const elem = document.createElement(‘div’) elem.className = ‘quetxt’ // add text elem.innerText = ‘Question:’ elem.style = ‘color:#d55900; font-weight:700; font-size: 18px; margin-top:15px; margin-bottom:10px; font-family:Georgia;’ // grab target element reference const target = document.querySelector(‘.article-header’) // insert the element before…Continue reading
Prevent Copy Paste
document.addEventListener(“contextmenu”, (evt) => { evt.preventDefault(); }, false); document.addEventListener(“copy”, (evt) => { evt.clipboardData.setData(“text/plain”, “You must pay a premium subscription to copy our content”); evt.preventDefault(); }, false);Continue reading
Custom Heading above Qty (Woocommerce)
let qty = document.querySelector(“.e-atc-qty-button-holder”); let text = ` How many card you’re planning to purchase? Choose Quantity of Cards ` qty.insertAdjacentHTML(“afterend” , text);Continue reading