How do i get file_get_contents to work in wordpress

It seems file_get_contents() isn’t active in your server. Instead, use the wp_remote_get(). Note wp_remote_get() is among the family of WordPress HTTP API specifically used for sending GET requests. The advantage of wp_remote_get() over file_get_contents() and other PHP stream/transport function is – The WordPress HTTP API was created to standardize a single API that handled everything … Read more

Events Manager plugin – booking form required fields

I manage to get the answers from this post –> https://wordpress.org/support/topic/change-required-fields-in-registration-form?replies=3 Instead of using ’em_event_validate’ add_filter(’em_event_validate’,’em_validate’, 1, 2); should be using ’em_booking_validate’ in the filter hook add_filter(’em_booking_validate’,’em_validate’, 1, 2);

post_parent in custom post type

Hook in when a post is deleted, check for the post type, then manipulate post_parent of potential child posts (or delete the posts): function wp_dev_174635_update_posts( $parent_id ) { $parent = get_post( $parent_id ); if ( $parent->post_type !== ‘type2’ ) { return; } $posts = get_posts( array( ‘post_type’ => ‘type1’, ‘post_parent’ => $parent_id, ) ); foreach … Read more

Locked out of admin panel after installing HC Custom WP-Admin URL [closed]

you sad u have access to phpmyadmin. Go to it, find wp_options table Look for custom_wpadmin_slug in option_name and in option_value column will be your’s custom defined wp-admin slug If you’ll still wount be able to access then remove next lines in .htaccess: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^{your_wp_admin_slug}/?$ {your_site.com/}wp-login.php [QSA,L] </IfModule> Note that {your_wp_admin_slug} … Read more

Front-end CSS Library for plugin [closed]

Achieving unaltered style via plugin for multiple themes is pretty difficult to achieve. How about this? Use any library among these e.g. Bootstrap in your plugin and then remove/comment the global properties from them. Since you will be author of the plugin, you can repeat the same thing in your plugin before releasing next update.

Shortcode not getting replaced

Shortcodes get replaced when you output the content via the_content() function, or apply the filters hooked to the_content. If you look at raw post data, you will always see the original shortcode placeholder, that is normal and expected.

Remove Yoast jQuery from front end

How this line (9th) is created within your theme code? <script type=”text/javascript” src=”https://wordpress.stackexchange.com/wp-content/themes/blankslate/js/jquery-1.11.1.min.js”></script> If it is hard-coded in header.php, then I would recommend to remove it. Scripts should be enqueued instead of hard-coding them. Next, you can de-register jquery.migrate script with the following code added to functions.php: /** * Remove jQuery migrate script */ add_filter( … Read more