How to hide a customization link themes menu in wordpress?

Thats not a default wordpress menu, your theme adds that using add_theme_page() function. Just remove ( or comment out //, so in future you can enable it again ) that from functions.php file to remove the menu completely. Update – There’s another (More Efficient) way is using WordPress Function – remove menu page() – @Wyck

Generate Random Post Links Somewhere in the post

Edit You have indicated that you wish to reuse this code, so it is better used within a function so that it can be called whenever you desire. I’ve made changes to my answer to reflect this below. You can use the below code to generate a list of posts (in you case 2x random … Read more

How to add/change a value of $wpdb property/var?

Yep, just declare global $wpdb early enough and modify its fields. Codex docs for add_metadata() say exactly that: Note that you will also have to register the table with the $wpdb object in order for it to work. Simply add the following to WordPress’ init hook (or at least before you attempt to use any … Read more

Setting a page link in the footer?

What may be easier (if you don’t necessarily want all the same menu items to appear in the footer) is to: Create a new menu, “Footer Menu” for example Add-in whatever links (pages) are needed there Add a widget (called Custom Menu) to a footer widget position (if your current theme supports it). Let me … Read more

Deep linking to an accordion tab with Visual Composer

After having the same issue, I’ve come up with a basic solution – hopefully it’s not too late for you. The Visual Composer “accordion plugin” seems to be a wrapper around the jQuery UI accordion; so the same methods are available. I’ve written some basic (room for improvement no doubt) code that checks if there … Read more

Open link in a new tab checked by default when adding a new link in visual post editor

Add this function in your theme’s functions.php function my_enqueue($hook) { if (‘post.php’ != $hook ) { return; } wp_enqueue_script(‘my_custom_script’, get_template_directory_uri() . ‘/js/myscript.js’); } add_action(‘admin_enqueue_scripts’, ‘my_enqueue’);` In myscript.js place this code jQuery(document).ready(function(){ jQuery(‘#wp-link-target’).prop(“checked”, true); }) It worked for me.

programatically change href to onclick=window.open

Parsing HTML with regular expressions is not ideal. A better alternative is to use DOMDocument and DOMXpath; This code uses DOMDocument and DOMXpath to parse and modify the HTML without relying on regular expressions. Each link in the content will have the onclick attribute added along with the appropriate window.open() code using the URL pulled … Read more