Forum Replies Created

Viewing 15 replies - 1 through 15 (of 16 total)
  • durdesh

    (@durdesh)

    Use the !defined() check to prevent redefinition.

    if ( !defined('ABSPATH') )
    define('ABSPATH', dirname(FILE) . '/');

    Check your wp-config.php file (and any includes it has) for duplicate definitions. Constants should only be defined once, like this.

    • This reply was modified 1 year ago by durdesh.
    durdesh

    (@durdesh)

    Make sure the Tronix theme registers menus in its functions.php. You should see something like:

    register_nav_menus( array(
    'main-menu' => __( 'Main Menu', 'tronix' ),
    ) );

    If you’ve created a custom header template, you need to insert the WordPress menu manually where you want it to appear.

    Add this PHP code inside your custom header template file (e.g., header-custom.php):

    'main-menu', 'container' => 'nav', 'container_class' => 'custom-menu-container', 'menu_class' => 'custom-menu', ) ); ?>

    This will output the menu assigned to “Main Menu” in Appearance → Menus.

    Go to: Appearance → Menus → Manage Locations
    → Assign your created menu to Main Menu (or the location you used in theme_location).

    If you’re creating the custom header with Elementor or Tronix Customizer, use a Menu Widget:

    • Add a Navigation Menu widget (Elementor) or “Menu” block (Customizer).
    • Choose the menu from the dropdown.
    • Style it directly within the builder.

    I hope you should have a solution now. still problem? you need contact with theme author or HIRE an expert from freelancer directory.

    Thank you.

    Forum: Fixing WordPress
    In reply to: Adding some CSS
    durdesh

    (@durdesh)

    @media only screen and (max-width: 769px) {
    #bcn_widget-2 {
    background-color: #c2e9ee;
    padding: 0 8px;
    margin-left: 0 !important; /* Ensure no gap on the left */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* right-side subtle shadow */
    }

    #bcn_widget-2 .breadcrumbs span:last-child {
    font-weight: bold; /* Make the last breadcrumb bold */
    }
    }

    Use it.

    durdesh

    (@durdesh)

    I have tried to reach you for a solution. Thanks.

    durdesh

    (@durdesh)

    Hi, if the problem presist till now you need an expert unless you can fix the problem. i think you missing some important point as a result problem is remain same. first you should disable all plugin (one by one) and check if any plugin is the reason for that. any plugin conflict may be a reason.

    • This reply was modified 1 year ago by durdesh.
    durdesh

    (@durdesh)

    I am sorry to hear this but i can see code is correct. You may need deubugg the problem first which line showing the error. you can wait for other expert or you can lookup this by HIRE someone from freelancer directory (for your urgency).

    durdesh

    (@durdesh)

    Does it solved? now

    • This reply was modified 1 year ago by durdesh.
    durdesh

    (@durdesh)

    Here is your possible path to check this out. Open your wp-config.php file. Find the code below & make change like below.

    define('WP_DEBUG', true);
    define('WP_DEBUG_LOG', true);
    define('WP_DEBUG_DISPLAY', false);

    /wp-content/debug.log (check the exact error from log file). once you get the issue then it will be possible to solve.

    durdesh

    (@durdesh)

    I can see quotation error. everytime i paste the code here it is making me same. please try the code below if you still face issue try to scan the code and fix from online.

    jQuery(document).ready(function($) {
    $('.add_to_cart_button').each(function() {
    var $btn = $(this);

    // Avoid double-wrapping
    if (!$btn.closest('.hover-tooltip').length) {
    // Create tooltip element
    var tooltip = $('<span class="hover-tooltip">Add this item to your cart</span>');

    // Wrap the button and append the tooltip
    $btn.wrap('<div class="tooltip-wrapper"></div>');
    $btn.after(tooltip);
    }
    });
    });
    durdesh

    (@durdesh)

    Thank you, I can see the screenshot but I don’t see any error highlights. Seems you placed the code to correct place. If any error appear you need check error log file. There is a notice where the code error.

    durdesh

    (@durdesh)

    absolutely strange. I don’t see the screenshot. Can you upload it somewhere else? Or explain your error that you seeing after applying the code?

    durdesh

    (@durdesh)

    i could help by screenshot but still 404

    durdesh

    (@durdesh)

    Screenshot url is not found 404

    durdesh

    (@durdesh)

    jQuery(document).ready(function($) { $('.add_to_cart_button').each(function() { var $btn = $(this); // Avoid double-wrapping if (!$btn.closest('.hover-tooltip').length) { // Create tooltip element var tooltip = $('<span class="tooltip-text">Add this item to your cart</span>'); // Wrap the button and append the tooltip $btn.wrap('<div class="hover-tooltip" style="display:inline-block; position:relative;"></div>'); $btn.after(tooltip); } });});

    put the code before </body>

    here is css code for you.

    .hover-tooltip .tooltip-text { visibility: hidden; background-color: #333; color: #fff; text-align: center; padding: 6px 10px; border-radius: 4px; position: absolute; z-index: 999; bottom: 125%; left: 50%; transform: translateX(-50%); opacity: 0; transition: opacity 0.3s; white-space: nowrap;}.hover-tooltip:hover .tooltip-text { visibility: visible; opacity: 1;}

    Previous code also correct and now I give you with css. If you do not apply code correct place it will give you error again. May be you need to HIRE a freelancer if you don’t know the coding matter.

    lets try it first.

    durdesh

    (@durdesh)

    here is code for your goal:

    jQuery(document).ready(function($) { $(‘.add_to_cart_button’).each(function() { const $btn = $(this); if (!$btn.parent().hasClass(‘hover-tooltip’)) { $btn.wrap(‘<div class=”hover-tooltip”></div>’); $btn.after(‘<span class=”tooltip-text”>Add this item to your cart</span>’); } });});

    you will need css as per your design.

Viewing 15 replies - 1 through 15 (of 16 total)