How to modify mobile nav menu text in theme

You can leverage the use of the gettext filter to change the text. Add this code to your child theme’s functions.php or to a plugin: add_filter(‘gettext’, ‘wpse248225_change_text’, 20, 3 ); function wpse248225_change_text( $translated_text, $untranslated_text, $domain ) { if ( NECTAR_THEME_NAME !== $domain ) { return $translated_text; } // Make the changes to the text switch( … Read more

Valid SQL query not returning results

Here you’ve did something wrong with $wpdb->table_name. It will only return the default WordPress table names. Not custom table names. And also when you call $wpdb->prepare then pass the parameter as array. So your function will be like below- function get_info($postid) { global $wpdb; // Here I assumed that your table name is ‘{$wpdb->prefix}places_locator’ $sql … Read more

call_user_func_array() expects parameter 1 to be a valid callback, function

You have to change this add_action(‘admin_menu’,’mafongroup_admin_menu’); to add_action(‘admin_menu’,array( $this, ‘mafongroup_admin_menu’ ) );. Cause you’r here calling a class method. So you’ve to give reference to the class. And also if you put public before declaring mafongroup_admin_menu() function, it would be more readable and would be helpful in future I think. See the updated class code … Read more

Password protect a custom template

Post_password_required returns false in two cases: No password required Cookie with password present So, once you have entered the password and logged out, the cookie will still be present and you get access to the content. (When I go to your site, without login or password, I get the password field just as I should)

Visual Composer: Where do I find the source code of a custom element?

The problem of not finding the elements was that the installed WordPress version of my template (Cohhe Autorepair) installed a template specific plugin, which was only compressed in the local (offline) template version. Uncompressing the plugin yielded success with grep “some text” -nr /templateFolder The final directory was given by: /wp-content/plugins/autorepair-plugin/lib/functions/shortcodes.php

Give posts a particular template based on the assigned category

nikolaou, When I understand you question correct then you want to use different templates based on the categories you’re using within your posts, correct? If that’s the case, then you only need one template (single.php) and a combination of get_the_terms() and get_template_part(). <?php $categories = get_the_terms(get_the_ID(), ‘slug’); if ( in_array(‘cat1’, $categories) ) { get_template_part(‘partials/single’, ‘1’); … Read more