Landing / Static HTML page

Just name the landing page file index.html and place it (and any assets) in the root directory, then add this to your .htaccess (assuming you’re using Apache): DirectoryIndex index.html index.php When accessing http://example.com, Apache will serve index.html. WordPress will scoop up all other requests with it’s rewrite rules.

How to remove Profile Picture section or the message “You can change your profile picture on Gravatar.”

To remove the profile picture row of the table (which includes the gravatar link): jQuery( “tr.user-profile-picture” ).remove(); To remove that entire “about yourself” table: jQuery( “tr.user-profile-picture” ).parents(“table:first”).remove(); Use this type of jQuery call, don’t try to get fancy with the loop. This is on WP 4.4; earlier versions may have different HTML class names for … Read more

How to customize search result page title?

Within the wp_get_document_title() function we have: // If it’s a search, use a dynamic search results title. } elseif ( is_search() ) { /* translators: %s: search phrase */ $title[‘title’] = sprintf( __( ‘Search Results for “%s”’ ), get_search_query() ); so you could hook into the document_title_parts filter to adjust it to your neds. Example: … Read more

Trash bin for categories

This would be quite challenging to implement. Posts can be trashed because: They have a concept of status and corresponding field in database table WordPress code “knows” to only deal with posts of appropriate status for most purposes This solves issues of visibility (posts won’t appear on front end) and interaction (trashed posts won’t show … Read more

Where is the “default attribute” values located in the phpMyAdmin in Woocommerce?

Default attributes of WooCommerce variable products are stored as post meta in the database. You can find them in the wp_postmeta table, where the post_id column is the post ID of the parent product (Variable product), and the meta_key column is _default_attributes. You can clear and remove default attributes of all products by replacing all … Read more

Custom post type column which compares dates?

I solved it: if ( ‘visitor_active’ == $column_name ) { $start_date = get_post_meta( $post_id, ‘visitor-start-date’, true ); $end_date = get_post_meta( $post_id, ‘visitor-end-date’, true ); $current_time = current_time( ‘timestamp’ ); if ($start_date < $current_time && $end_date > $current_time) { echo ‘<span class=”dashicons dashicons-yes” style=”color:#75c377;”></span>’; } else { echo ‘<span class=”dashicons dashicons-no” style=”color:lightgray;”></span>’; } } Don’t know … Read more

Best practices for A/B testing?

This is not a straight WordPress solution but I would recommend a/b testing feature found in the Google website optimizer. http://www.google.com/websiteoptimizer/b/index.html. It works with your analytics account. You just need to create two (or more) pages in WordPress.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)