Shashwat Mittal
Forum Replies Created
-
Please check if you can find
show_admin_bar
filter anywhere in your code.
Because this will hide the admin bar.add_filter('show_admin_bar', '__return_false');
Forum: Developing with WordPress
In reply to: Search toggle disappears when logged out of WPHave you checked the filter
genesis_header
where is it used?Forum: Fixing WordPress
In reply to: Automatic Updater Disabled, but WP still Updated@markrh Yeah, you are right, missed that.
Forum: Fixing WordPress
In reply to: Real time CronYou can use
wp_schedule_event
to schedule a specific action according to your time. You can hook whatever function you want to run to that action.Ref: https://codex.www.ads-software.com/Function_Reference/wp_schedule_event
Edit: Keep in mind that WordPress crons are faux crons, not actual crons, they will only run if someone is on the site. To schedule an actual cron you can use something like Cavalcade or server cron.
- This reply was modified 6 years, 2 months ago by Shashwat Mittal.
Forum: Fixing WordPress
In reply to: Automatic Updater Disabled, but WP still Updateddefine( 'WP_AUTO_UPDATE_CORE', false );
I guess you need to use this rather than
define( 'AUTOMATIC_UPDATER_DISABLED', false );
Forum: Fixing WordPress
In reply to: Serve resources from a consistent URL@vezlay Both the URL’s are not different, they are same only, the part after the
?
are known as query parameters, and does not affect the URL in anyway, you can put anything after that, herew=400
mostly will be there to compare the width at some place.Are you facing any errors or notices because of this?
Forum: Developing with WordPress
In reply to: Pagination Issues@harshclimate Have you tried logging the
$paged
variable, is it returning a proper value, also have you usedwp_reset_postdata()
anywhere, if yes is it before or afterthe_posts_pagination()
?Edit: Saw
wp_reset_postdata()
in the txt file you shared, can you move it after the post pagination and try once.- This reply was modified 6 years, 2 months ago by Shashwat Mittal.
Forum: Developing with WordPress
In reply to: Pagination IssuesHave you tried setting the
prev_text
andnext_text
parameters in the array you are passing tothe_posts_pagination()
and also are the number of posts available more than 16?- This reply was modified 6 years, 2 months ago by Shashwat Mittal.
Forum: Fixing WordPress
In reply to: Serve resources from a consistent URLPlease provide any two urls pointing to the same image?
Forum: Plugins
In reply to: [WooCommerce] Product Shipping CostThanks for the quick response. Found the product shipping classes useful. Worked for me.
By what time should I expect the next core release to be released?
Forum: Fixing WordPress
In reply to: Filter in “All Post” only specific postsYou can create an Array of the ID’s of the posts that you need to delete.
Then run a loop on that array and callwp_delete_post($id);
.
Documentation for wp_delete_post()Example:
$id_array = [ 33, 34, 35, 26]; foreach ( $id_array as $id ) { wp_delete_post( $id ); }
Forum: Developing with WordPress
In reply to: Creating custom image sizes using add_image_size()Documentation for add_image_size()
The string parameter that you pass to
add_image_size()
is the name or specific identifier for that specific image size that you define in the function.
To display the post image size you need to pass the name or specific identifier tothe_post_thumbnail()
$size parameter.Documentation for the_post_thumbnail()
Example:
In function.php:
add_image_size( “my_image_size”, $width, $height, false );In your Recent post:
the_post_thumbnail( “my_image_size” );Hope this helps!
Forum: Fixing WordPress
In reply to: Display Featured images only in Selected Custom Post TypeYou can use the
get_post_type()
function and call featured thumbnail only when it matches your desired post type.
In your case:if ( "Course" === get_post_type() ) { the_post_thumbnail(); }
Forum: Plugins
In reply to: [WP Ultimate Post Grid] WP POST STYLES GONE MISSINGborder-width: 1px !important; border-color: rgb(0, 0, 0) !important;
You need to remove the above styling from the code below. This inline style applied to this div is causing the black border to appear black and not properly aligned.
<div id="wpupg-container-post-2459" data-id="2459" data-permalink="https://www.livegreengate.com/waxy-oconnors-printworks/" data-custom-link="" data-custom-link-behaviour="default" data-image="https://www.livegreengate.com/wp-content/uploads/2017/08/waxys.png" class="wpupg-item wpupg-page-0 wpupg-post-2459 wpupg-type-post wpupg-tax-category-greengate-perks wpupg-container" style="margin: 0px;width: 100% !important;max-width: 200px !important;border-width: 1px !important;border-color: rgb(0, 0, 0) !important;border-style: solid !important;vertical-align: inherit !important;position: absolute;left: 852px;top: 0px;">
…
</div>
This is applied to every post.
- This reply was modified 7 years, 3 months ago by Shashwat Mittal.