Sample widget code which get data(1-5 record) from Wp_Admin panel and display to Homepage(WordPress Custom Theme)

As everyone commented above, you need to explain where you are having problem, there are a lot of ways to achieve what you want to do, Option 1 : Advance Custom Field Plugin: https://wordpress.org/plugins/advanced-custom-fields/ this can help you to create custom fields at the admin panel and display them at front-end, please see the plugin … Read more

Create an if statement based on page_id

You don’t need if (is_home) – the homepage doesn’t use page.php as a template, and you’re checking for page ID anyway, which the homepage shouldn’t match. To check what page you’re on you can use is_page() with the page ID. if(is_page(1111)) { display text 01; } elseif(is_page(2222)) { display text 02; }

JSON Object Value Show Undefine

You either need to tell jQuery that you expect a json response from the server: $(“#txt-cmt”).keypress(function(e) { if (e.which == 13) { var comment = $(this).val(); var message = { action: ‘show_comment’, user_message: comment }; $.post(ajaxUrl.url, message, function(data) { console.log(data.user_name); }, ‘json’); } }); or you need to parse the response as json with JSON.parse().

Include plugin´s table in custom query

This was the solution: <?php /** * @package WordPress * @subpackage U-Design */ if (!defined(‘ABSPATH’)) exit; // Exit if accessed directly get_header(); include(‘scripts/search_excerpt/ylsy_search_excerpt.php’); $search = $_GET[‘s’]; $all_users = new WP_User_Query( array( ‘role’ => ‘dc_vendor’, ‘meta_query’ => array( ‘relation’ => ‘OR’, array( ‘key’ => ‘_vendor_country’, ‘value’ => $search, ‘compare’ => ‘=’ ), ) ) ); //echo … Read more

Navigation menu, remove item from desktop

Although this is not really a WordPress question, but the visibility property does not actually HIDE any element. It only fades it so you can’t see it, but it still reserves space for it. You need to use the display property: .mobile-only { display:hidden; } @media (min-width:992px) { .desktop-only { display:block !important; } } @media … Read more

Broken links help with site

You could use your text editor on your theme and plugin files to search for the /js/respond.src.js in the source code. If in a theme, then create a Child Theme and modify that php file. (Any changes you make to a theme’s code will be overwritten in the next theme update.) If it is a … Read more

remove white overlay [closed]

On both pages template find <div class=”overlay-for-image-bg”> and replace it with <div> only. Needles to say, you should make this change in child theme’s template, to avoid your changes being overwritten when you update your theme. Or you can modify /wp-content/uploads/mesh/custom.css file by removing the following block: .overlay-for-image-bg { /* some stuff */ }