What is the “pub” theme? [closed]

There is no pub theme, that’s a quirk of how WordPress.com the premium 3rd party service ran by Automattic is internally structured. It’s non-standard. To be more specific WP.com doesn’t use the normal theme folder structure, and instead of searching wp-content/themes for theme folders, it searches wp-content/themes/pub and several others for themes, but mostly pub. … Read more

How not to show leave a Reply to Home Page?

Follow these steps: Go to ‘Pages’. Look for the page you’ve set as your homepage in the list. Hover your cursor over the title and click on ‘Quick Edit’. Uncheck ‘Allow Comments’ and then ‘Update’. Edit: For disabling Trackbacks and Pingbacks (and Comments too!): Open the page you’ve set as your homepage for editing. Look … Read more

wp-admin/admin-ajax.php – Slowing My Site down

admin-ajax.php is called with the following action: wpp_update. Look for whatever this action does, it may be doing a remote request, a big query, or something else that takes a long time to execute. A quick search for wpp_update reveals the plugin to be WordPress Popular Posts. This function is being called http://plugins.trac.wordpress.org/browser/wordpress-popular-posts/tags/2.2.1/wordpress-popular-posts.php#L360 There are … Read more

Recent posts on homepage

First, ensure that your template file is named home.php. Second, there’s no need to use a custom query loop in this context. If you only want to display 3 posts on the blog posts index (i.e. the “homepage”), then filter the main loop query via pre_get_posts: function wpse83660_filter_pre_get_posts( $query ) { if ( is_home() && … Read more

Hide text if not homepage

You can use is_paged() …checks if page being displayed is “paged” and the current page number is greater than one. This is a boolean function, meaning it returns either TRUE or FALSE. You can adjust your code as follows <?php if( is_home() && !is_paged() ) : ?> <p>Some text</p> <?php endif;?>

Hide posts belongs to few categories in homepage

You can do this with pre_get_posts. This hook is called after the query variable object is created, but before the actual query is run. For excluding category id 32 and 39 from homepage, you can setup a function like this. function wpse_exclude_categories( $query ) { if ( is_admin() ) return; if ( $query->is_home() && $query->is_main_query() … Read more

Debugging why featured images have stopped showing in WooCommerce on the homepage [closed]

These are WooCommerce 3.x instructions only. That thread on GitHub (https://github.com/woocommerce/woocommerce/issues/14914#issuecomment-299714488) was updated by one of the Woo devs and he provided an example loop and explained what is happening: Featured was meta in 2.6, but is a taxonomy (for performance!) in 3.0 – so adjust queries to use tax_query instead of meta_query accordingly. To … Read more

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