Forum Replies Created

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • in reply to: How can we run multiple MySQL server on a single machine? #118
    avi
    Participant

    Yes, you just need to run them on separate ports and point them at different lib directories for their data.
    Here’s a good reference: http://dev.mysql.com/doc/refman/5.1/en/mutiple-servers.html
    (If you want to use this for testing, I suggest checking out MySQL Sandbox which is now replaced by dbdeployer)

    in reply to: How to send email in a table format in php #154
    avi
    Participant

    $msg variable is used here to store the content of the mail, you can store table structure in $msg and pass it in mail() function.

    email-content.txt

    avi
    Participant

    Add this code in functions.php file :

    $atts = shortcode_atts( array(
            'title' => null,
            'category_id' => null
        ), $atts);

    and after that you can use the given code for print the value where you want :

    echo $atts['title'];

    avi
    Participant
    <?php
    /*
    Plugin Name: Custom Post Types
    Description: Add post types for custom articles
    Author: Hostinger Dev
    */
    // Hook ht_custom_post_custom_article() to the init action hook
    add_action( 'init', 'custom_post' );
    // The custom function to register a custom article post type
    function custom_post() {
    // Set the labels. This variable is used in the $args array
    $labels = array(
    'name' => __( 'Custom Articles' ),
    'singular_name' => __( 'Custom Article' ),
    'add_new' => __( 'Add New Custom Article' ),
    'add_new_item' => __( 'Add New Custom Article' ),
    'edit_item' => __( 'Edit Custom Article' ),
    'new_item' => __( 'New Custom Article' ),
    'all_items' => __( 'All Custom Articles' ),
    'view_item' => __( 'View Custom Article' ),
    'search_items' => __( 'Search Custom Article' ),
    'featured_image' => 'Poster',
    'set_featured_image' => 'Add Poster'
    );
    // The arguments for our post type, to be entered as parameter 2 of register_post_type()
    $args = array(
    'labels' => $labels,
    'description' => 'Holds our custom article post specific data',
    'public' => true,
    'menu_position' => 6,
    'supports' => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments', 'custom-fields' ),
    'has_archive' => true,
    'show_in_admin_bar' => true,
    'show_in_nav_menus' => true,
    'query_var' => true,
    );
    // Call the actual WordPress function
    // Parameter 1 is a name for the post type
    // Parameter 2 is the $args array
    register_post_type('article', $args);
    }

    This may help…!

    in reply to: adding Variable product inside Grouped product #136
    avi
    Participant

    search for “wpclever” in the plugins and install this plugin…

    img

    woocommerce wont allow you to group simple products with variable product
    select ‘smart grouped’ product in product data list
    this plugin allows you to add simple and variable product together

    • This reply was modified 1 month, 2 weeks ago by avi.
    in reply to: How to convert text column to datetime in SQL? #115
    avi
    Participant

    Step 1: Add new Column
    ALTER TABLE table_name ADD (duplicate_column datetime);
    Step 2: Update new Column with existing value
    UPDATE table_name SET duplicate_column = str_to_date(column_name, '%d-%m-%Y %h:%i:%s');

    in reply to: How to make horizontal scrollable div in a mobile view #107
    avi
    Participant

    Just try to apply flex none to the div to keep their size and a specify media query where you want desktop to start.

    .images {
        display: flex;
        align-items:center;
        background-color: #eee;
        padding: 1rem;
        overflow-x: scroll;
    }
    
    .images > div {
        flex: none;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .images img {
        max-width:100%;
        width: 100%;
    }
    
    @media (min-width: 960px) {
    
      .images {
         overflow-x: visible;
      }
    
      .images > div {
        flex-basis: 0;
        flex-grow: 1;
       }
    }
    avi
    Participant

    @Vanshika thanks for the solution

Viewing 8 posts - 1 through 8 (of 8 total)
Scroll to Top