WP Cover https://www.wpcover.com WordPress News, Tutorials, Plugins, & Themes Sun, 02 Jul 2017 13:36:18 +0000 en-US hourly 1 https://wordpress.org/?v=4.8 Gravity Forms Create Optgroups to Separate Select Options https://www.wpcover.com/gravity-forms-create-optgroups-separate-select-options/ https://www.wpcover.com/gravity-forms-create-optgroups-separate-select-options/#respond Sun, 02 Jul 2017 13:35:06 +0000 https://www.wpcover.com/?p=801 Gravity Forms is another plugin that I leverage on the majority of sites I develop.  It’s well developed, well maintained, and has all the necessary features you would expect from a form builder.  While I was building a Gravity Form the other day, I had the need to create Optgroups within the default Drop Down […]

The post Gravity Forms Create Optgroups to Separate Select Options appeared first on WP Cover.

]]>
Gravity Forms is another plugin that I leverage on the majority of sites I develop.  It’s well developed, well maintained, and has all the necessary features you would expect from a form builder.  While I was building a Gravity Form the other day, I had the need to create Optgroups within the default Drop Down field.  After doing a bit of searching, I stumbled across this great filter on Github.

/**
 * Filter Gravity Forms select field display to wrap optgroups where defined
 * USE:
 * set the value of the select option to `optgroup` within the form editor. The 
 * filter will then automagically wrap the options following until the start of 
 * the next option group
 */

add_filter( 'gform_field_content', 'filter_gf_select_optgroup', 10, 2 );
function filter_gf_select_optgroup( $input, $field ) {
    if ( $field->type == 'select' ) {
        $opt_placeholder_regex = strpos($input,'gf_placeholder') === false ? '' : "<\s*?option.*?class='gf_placeholder'>[^<>]+<\/option\b[^>]*>";
        $opt_regex = "/<\s*?select\b[^>]*>" . $opt_placeholder_regex . "(.*?)<\/select\b[^>]*>/i";
        $opt_group_regex = "/<\s*?option\s*?value='optgroup\b[^>]*>([^<>]+)<\/option\b[^>]*>/i";

        preg_match($opt_regex, $input, $opt_values);
        $split_options = preg_split($opt_group_regex, $opt_values[1]);
        $optgroup_found = count($split_options) > 1;

        // sometimes first item in the split is blank
        if( strlen($split_options[0]) < 1 ){
            unset($split_options[0]);
            $split_options = array_values( $split_options );
        }

        if( $optgroup_found ){
            $fixed_options = '';
            preg_match_all($opt_group_regex, $opt_values[1], $opt_group_match);
            if( count($opt_group_match) > 1 ){
                foreach( $split_options as $index => $option ){
                    $fixed_options .= "<optgroup label='" . $opt_group_match[1][$index] . "'>" . $option . '</optgroup>';
                }
            }
            $input = str_replace($opt_values[1], $fixed_options, $input);
        }
    }

    return $input;
}

 

How do you use it? First, copy and paste the above code into your active themes function.php file.

From there, you will want to create a Drop Down field within your Gravity Form and make sure the checkbox that states ‘Show Values’ is ticked. Next, add the value ‘optgroup’ wherever you want to create a new options group.

The result is a beautiful and more importantly, organized select drop down:

 

The post Gravity Forms Create Optgroups to Separate Select Options appeared first on WP Cover.

]]>
https://www.wpcover.com/gravity-forms-create-optgroups-separate-select-options/feed/ 0
WooCommerce 3.0 – woocommerce_free_price_html – No Longer Working https://www.wpcover.com/woocommerce-3-0-woocommerce_free_price_html-no-longer-working/ https://www.wpcover.com/woocommerce-3-0-woocommerce_free_price_html-no-longer-working/#comments Tue, 16 May 2017 03:44:25 +0000 https://www.wpcover.com/?p=784 WooCommerce 3.0 has arrived!  While many are jumping for joy at new features & improved code, there’s some of us that have had to devote some time to putting out fires.  WooCommerce 3.0 depreciated, added, and modified some important filters & API requests that were working in 2.0 causing client bugs.  One issue we’ve recently […]

The post WooCommerce 3.0 – woocommerce_free_price_html – No Longer Working appeared first on WP Cover.

]]>
WooCommerce 3.0 has arrived!  While many are jumping for joy at new features & improved code, there’s some of us that have had to devote some time to putting out fires.  WooCommerce 3.0 depreciated, added, and modified some important filters & API requests that were working in 2.0 causing client bugs.  One issue we’ve recently come across is with the following filters:

  • woocommerce_free_price_html
  • woocommerce_variable_free_price_html
  • woocommerce_variation_free_price_html

 
Our previous function as shown below, was utilized with Advanced Custom Fields to manipulate the text that was displayed when the product price was set to $0.00:

 

add_filter( 'woocommerce_variable_free_price_html','wpcover_free_price_text' );
add_filter( 'woocommerce_free_price_html','wpcover_free_price_text' );
add_filter( 'woocommerce_variation_free_price_html','wpcover_free_price_text' );

function wpcover_free_price_text( $price ) {
	global $post;
	if(get_field('wpc_price_headline', $post->ID)) {
		return get_field('wpc_price_headline', $post->ID);
	} else {
		return '$10 / Per Team';
	}
}

As you can see from the above snippet, the code would check if the price of a simple or variable product had a regular price of $0.00. If so, it checked to see if the product had a valve in the Advanced Custom Field of wpc_price_headline, if not it returned some standard text.

What Happened & The Fix

Information on why exactly this filter stop working was hard to come by. From what I did find within the WooCommerce site, it was depreciated due to localization issues. However, the fix was pretty straight-forward and worked nicely, here is what I did:

add_filter( 'woocommerce_get_price_html','wpcover_free_price_text' );

function wpcover_free_price_text( $price, $product ) {
	global $post;
	global $product;
	$pprice = $product->get_price();
	if($pprice == '0.00') {
		if(get_field('wpc_price_headline', $post->ID)) {
			return get_field('wpc_price_headline', $post->ID);
		} else {
			return '$10 / Per Team';
		}
	}
}

There’s your fix!

The post WooCommerce 3.0 – woocommerce_free_price_html – No Longer Working appeared first on WP Cover.

]]>
https://www.wpcover.com/woocommerce-3-0-woocommerce_free_price_html-no-longer-working/feed/ 1
Gravity Forms Require Date Picker To Be Future Date https://www.wpcover.com/gravity-forms-require-date-picker-future-date/ https://www.wpcover.com/gravity-forms-require-date-picker-future-date/#respond Thu, 04 May 2017 03:48:29 +0000 https://www.wpcover.com/?p=778 A couple times over the last month I’ve been asked the same question regarding Gravity Forms, “How can I require the user using the date picker to select a future date?” Very good question and something I was surprised I had not stumbled upon before.  The current client was creating a booking platform and wanted to ensure the […]

The post Gravity Forms Require Date Picker To Be Future Date appeared first on WP Cover.

]]>
A couple times over the last month I’ve been asked the same question regarding Gravity Forms, “How can I require the user using the date picker to select a future date?”

Very good question and something I was surprised I had not stumbled upon before.  The current client was creating a booking platform and wanted to ensure the user submitting the form selected a day in the future so they had time to prepare the lesson and have instructors available.

Luckily, it was pretty straight-forward.  Gravity Forms utilizes the jQuery datepicker which can be seen here in all it’s glory: https://jqueryui.com/datepicker/

In order to modify the default functionality, we simply needed to find the ID of the field in question and target it using some jQuery.  My first attempt looked something like this:

 

jQuery(document).ready(function($) {
	jQuery( "#input_5_4" ).datepicker({ defaultDate: '+1d', minDate: '+1d', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true});
});

 

All good? Not so fast. Once implementing I realized my form would not submit due to validation errors. What was wrong? The jQuery datepicker format! The datepicker was returning a different format of the address versus what Gravity Forms was expecting. Therefore, an extra option added to the jQuery did the trick in correctly formatting:

 

jQuery(document).ready(function($) {
	jQuery( "#input_5_4" ).datepicker({ defaultDate: '+1d', minDate: '+1d', gotoCurrent: true, prevText: '', showOn: 'both', buttonImage: '/wp-content/plugins/gravityforms/images/calendar.png', buttonImageOnly: true, dateFormat: 'mm/dd/yy' });
});

 

That did it! With the code above, the user could only select a datepicker value in the future (a day after the current date) and it would return the correct format (mm/dd/yy) that Gravity Forms was expecting.

The post Gravity Forms Require Date Picker To Be Future Date appeared first on WP Cover.

]]>
https://www.wpcover.com/gravity-forms-require-date-picker-future-date/feed/ 0
Animista – Awesome Pure CSS Animations https://www.wpcover.com/animista-awesome-pure-css-animations/ https://www.wpcover.com/animista-awesome-pure-css-animations/#respond Tue, 21 Mar 2017 22:50:20 +0000 https://www.wpcover.com/?p=773 Super quick post this evening, mainly for my own reference.  Super cool site, animista.net, is a collection of pre-made CSS animations.  Play with different animations, favorite them as you’d like, and quickly implement. Some very neat animations within this directory and the design of the site is fantastic.  Worth a look and bookmark :). Happy […]

The post Animista – Awesome Pure CSS Animations appeared first on WP Cover.

]]>
Super quick post this evening, mainly for my own reference.  Super cool site, animista.net, is a collection of pre-made CSS animations.  Play with different animations, favorite them as you’d like, and quickly implement.

Some very neat animations within this directory and the design of the site is fantastic.  Worth a look and bookmark :).

Happy Wednesday!

The post Animista – Awesome Pure CSS Animations appeared first on WP Cover.

]]>
https://www.wpcover.com/animista-awesome-pure-css-animations/feed/ 0
WordPress Plugin Delete WooCommerce Tax Rates https://www.wpcover.com/wordpress-plugin-delete-woocommerce-tax-rates/ https://www.wpcover.com/wordpress-plugin-delete-woocommerce-tax-rates/#respond Wed, 15 Mar 2017 13:34:17 +0000 https://www.wpcover.com/?p=764 Over at Bold City Agency, one of our specialties is e-commerce development.  We work heavily with APIs to sync data from point of sale systems to WooCoomerce.  Often times, customers have complex tax calculations that must be calculated based on the zip code the shipment is going to.  When this is required, we will ask […]

The post WordPress Plugin Delete WooCommerce Tax Rates appeared first on WP Cover.

]]>

Over at Bold City Agency, one of our specialties is e-commerce development.  We work heavily with APIs to sync data from point of sale systems to WooCoomerce.  Often times, customers have complex tax calculations that must be calculated based on the zip code the shipment is going to.  When this is required, we will ask them for an Excel spreadsheet containing all the tax rates.  More often than not, the client needs to change the info (as there is always a small tweak) which presents a problem; WooCommerce has no way of clearing the tax rate table except through PHPMyAdmin or a similar tool.

ChromeOrange wrote a great custom function that truncates the database table for the tax rates.  All I did was wrap it into a quick plugin and save it for future use.  So I thought I would share.

Download The Plugin

Once you download, install, and activate the plugin, go to: WooCommerce -> System Status -> Tools. There will be a delete all tax rates button.


If you would prefer to add the custom function to your themes functions.php file, you can use the alternative:

 

/**
 * Delete ALL WooCommerce tax rates
 *
 * Add to your theme functions.php then go to woocommerce -> system status -> tools and there will be a delete all tax rates button http://cld.wthms.co/tXvp
 */

add_filter( 'woocommerce_debug_tools', 'custom_woocommerce_debug_tools' );

function custom_woocommerce_debug_tools( $tools ) {
	$tools['woocommerce_delete_tax_rates'] = array(
		'name'		=> __( 'Delete Tax Rates',''),
		'button'	=> __( 'Delete ALL tax rates from WooCommerce','' ),
		'desc'		=> __( 'This tool will delete all your tax rates allowing you to start fresh.', '' ),
		'callback'  => 'woocommerce_delete_tax_rates'
	);
	return $tools;
}

/**
 * Delete Tax rates
 */
function woocommerce_delete_tax_rates() {
	global $wpdb;
			
	$wpdb->query( "TRUNCATE " . $wpdb->prefix . "woocommerce_tax_rates" );
	$wpdb->query( "TRUNCATE " . $wpdb->prefix . "woocommerce_tax_rate_locations" );

	echo '<div class="updated"><p>' . __( 'Tax rates successfully deleted', 'woocommerce' ) . '</p></div>';
}

The post WordPress Plugin Delete WooCommerce Tax Rates appeared first on WP Cover.

]]>
https://www.wpcover.com/wordpress-plugin-delete-woocommerce-tax-rates/feed/ 0
Exclude Custom Post Types From WordPress Search https://www.wpcover.com/exclude-custom-post-types-wordpress-search/ https://www.wpcover.com/exclude-custom-post-types-wordpress-search/#respond Tue, 28 Feb 2017 02:05:15 +0000 https://www.wpcover.com/?p=758 Ready for your quick code snippet this week?  Here it is: I’ve been working a lot with custom website backends.  In summary, this creates three separate aspects to the site.  You have: WordPress Admin (wp-admin) Website User Admin Frontend Of Site   When creating these setups, I often have the need to create custom post […]

The post Exclude Custom Post Types From WordPress Search appeared first on WP Cover.

]]>
Ready for your quick code snippet this week?  Here it is:

I’ve been working a lot with custom website backends.  In summary, this creates three separate aspects to the site.  You have:

  • WordPress Admin (wp-admin)
  • Website User Admin
  • Frontend Of Site

 
When creating these setups, I often have the need to create custom post types that are used for storing data but should not be shown on the site.  One thing that slips many developers minds, is the need to exclude these from the default search, and luckily it is easy:

 

function wpcover_filter_search($query) {
	if (!$query->is_admin && $query->is_search) {
		$query->set('post_type', array('post', 'programs', 'resource'));
	}
	return $query;
}
add_filter('pre_get_posts', 'wpcover_filter_search');

 

What we’re doing here is modifying the WordPress default search query to only look within the post types of ‘post’, ‘programs’, or ‘resource. You would want to modify these based on the post types on your custom site and what you want to be searchable.

There’s your quick code snippet of the week!

The post Exclude Custom Post Types From WordPress Search appeared first on WP Cover.

]]>
https://www.wpcover.com/exclude-custom-post-types-wordpress-search/feed/ 0
Creating A Homepage Looping Video Background https://www.wpcover.com/creating-homepage-looping-video-background/ https://www.wpcover.com/creating-homepage-looping-video-background/#comments Sun, 26 Feb 2017 18:10:10 +0000 https://www.wpcover.com/?p=751 It’s all the craze right now: VIDEO. It’s engaging, it’s new, and it’s ‘different’. Working at Bold City Agency, it’s our #1 requested feature on new site design. “Can I get one of those videos on the homepage?” We’re proud to say “Yes, yes you can!”. While we have it down to a science as […]

The post Creating A Homepage Looping Video Background appeared first on WP Cover.

]]>

It’s all the craze right now: VIDEO. It’s engaging, it’s new, and it’s ‘different’.

Working at Bold City Agency, it’s our #1 requested feature on new site design. “Can I get one of those videos on the homepage?” We’re proud to say “Yes, yes you can!”.

While we have it down to a science as far as where we get the video content, the editing process, video hosting, and finally implementation, we know it still be new to some. Here is a great guide to getting started building background looping videos on your WordPress based website (or any site for that matter).

This will be a two-step guide to handling background videos. First we’re going to touch on gathering and editing the footage. Second, we’ll discuss implementation and coding.

First, it’s time to curate the video content. There are lots of paid sites out there where you can buy stock videography. We’re not going to get into those as there’s also some great free resources if you don’t have the ability or time to go shoot your own content.

 

Free Looping Video Resources:

Coverr – https://coverr.co/

My personal favorite. Awesome background video content with implementation instructions and even the ability to ‘preview’.

Distill – http://www.wedistill.io/

Another great resource for free, commercial use video snippets. A nice feature of this site is they will deliver the new videos to you via email every ten days.

Pexels – https://videos.pexels.com/

Known for their free stock photography content, they also have great video content that can be used commercially.

Vimeo – https://vimeo.com/groups/freehd/

Everybody has heard of Vimeo but most don’t use it to it’s full potential. Did you know it is possible to join groups where people give away free stock clips?

Mazwai – http://mazwai.com/

A good source. I don’t love the site design and it’s often hard to find the ‘type’ of stock footage you’re looking for but still a good resource.

 

As a general rule, I like to gather 5-7 clips that I enjoy. These will be spliced together and each clip will run approximately 3-4 seconds. This creates a video that is between 15-30 seconds in length. From experience, most visitors to your site will not watch more than 15 seconds of the homepage video. Plus, keeping the video shorter reduces the video size and therefore load time of the site. Remember, sound does not matter as this background video will loop in silence. There’s no reason to add sound, the majority of visitors will not listen and it also increases video size.

Once you have your clips, it’s time to get to editing. As a general rule, I like to start with a video clip that is fairly static. Reason being is your video may still be loading in the background as it begins to play. While a video is loading (or buffering), it may pause itself intermittently in the first few seconds of the clip. If you pick a clip that is fairly static, it will be less noticeable if it is skipping or pausing.

As a second note, it is a good idea to begin the video with a fade in and end the video with a fade out. Whether you choose to fade to black or white is up to you, but keep it consistent.

Once you have your video created and exported to an mp4 format, it’s time to find a place to host it. Some people will host the video on the same server as their site, this is not recommended. It’s best to have your video hosted on a different hostname than your main site for loading purposes. Personally we use a Pro account with Vimeo which works amazing. Vimeo Pro offers you the ability to call the direct file path of the video file rather than the typical ‘embed’. Vimeo has impressive video compression technology, which drastically reduces the size of your video. Plus, their servers are specifically designed to handle video streaming.

Vimeo Pro (at the time of this post), is $199/year and is available here: https://vimeo.com/store/pro

Once signed up and your video has been uploaded and compressed, your ready to implement it on your website. Stay tuned for part two of this post where we discuss implementation techniques and making your video background cater to responsive websites.

The post Creating A Homepage Looping Video Background appeared first on WP Cover.

]]>
https://www.wpcover.com/creating-homepage-looping-video-background/feed/ 1
Oasis Workflow Plugin Review – Manage Editorial Review Processes https://www.wpcover.com/oasis-workflow-plugin-review-manage-editorial-review-processes/ https://www.wpcover.com/oasis-workflow-plugin-review-manage-editorial-review-processes/#respond Sun, 19 Feb 2017 16:25:20 +0000 https://www.wpcover.com/?p=735 The plugins that are being developed for WordPress these days are nothing short of amazing. Today, we’re going to take a look at the Oasis Workflow plugin, which has been specifically designed to automate and manage the internal content submission process within your WordPress setup. This plugin would be a recommendation for any company that […]

The post Oasis Workflow Plugin Review – Manage Editorial Review Processes appeared first on WP Cover.

]]>
The plugins that are being developed for WordPress these days are nothing short of amazing. Today, we’re going to take a look at the Oasis Workflow plugin, which has been specifically designed to automate and manage the internal content submission process within your WordPress setup.

This plugin would be a recommendation for any company that publishes a high amount of posts and needs a way to ensure the content is reviewed by different people/organizations within the company prior to going live.

 

Quick Overview

The Oasis Workflow plugin features a visual workflow designer that allows you to drag and drop the different stages of your processes into place. Once you have your stages outlined, you can connect them using arrows.

Once a post (or custom post type) is submitted, it can be configured to automatically move into the workflow. Once in the workflow, the post will move forwards or backwards based on acceptance or rejection until it reaches it’s last step, which is typically a published status.

 

My Testing

First, this plugin is really well thought-out. While there is a bit of an initial learning curve to understand the terminology, once you get it down you can have your workflows setup within a few minutes and be accepting/rejecting posts within an hour.   For my testing, I created an example workflow:

This workflow has four potential steps and each step is connected by arrows to indicate where the post moves if it is accepted or rejected. The blue arrows indicate acceptance on that stage of the workflow and the red arrows indicate rejection.

When an author begins to write a new post, the default Publish button on the right is substituted by a Submit To Workflow button:

This will send the post into the workflow process and our editors will be informed that a new post is in their queue for review. The Oasis Workflow plugin has capabilities to send emails directly to the editors (or any specific user, user role, or group of users) when a new post is assigned to their workflow step. These emails can be customized and merge tags can be used to input specific information into the emails:

When the editor signs into WordPress, they can visit their workflows and see the pending assignment. The editor can approve or reject the post and the workflow corresponds based on their actions. In this example if the editor accepts, the post moves on to a published status and is live on the site. If they reject it, the post moves back to the author.

If the post is rejected, the author has the ability to revise the post and send it back to the editor for further review. If the author determines that there is nothing they can do to revise the post for acceptance, they can also “backlog” the post to move it to a draft status for safe-keeping or future use.

This workflow can continue it’s process indefinitely until the post is either published or deleted.

Overall this is a pretty basic workflow but they can get much more advanced. Another more complex workflow may be:

  • Submission to copy editor
  • Submission to visual editor
  • Webmaster assistance with SEO
  • Submission to editor in chief
  • Published status.

Each of the above steps would have acceptance/rejection tied to it where the post would be returned to the appropriate person or group based on the decision made by the assignee.

 

Groups Add-on

An add-on to the Oasis Workflow plugin that I found especially useful was the Groups feature. This allows us to assign workflow steps to custom created groups rather than individual users or user roles. As an example, I can create a new group and assign users to it:

 

 

Now when I go and edit a step of the workflow, I can assign this newly created group to the specific task rather than a user role:

 

But there’s more! This plugin is packed with features and it really does take a bit of time to explore them all. Other awesome functionality that comes packaged right out of the box includes:

  • Custom Post Statuses – Create custom post statuses that can then be assigned to workflow steps based on acceptance or rejection.
  • Due Dates & Reminders – Set due dates during each submission step. Automatic email reminders alert assigned users asking them to complete their acceptance or rejection.
  • Process History – Tracks user and system actions on all the posts within the workflow. Download this history for audit purposes if needed.
  • Additional Add-ons – Oasis Workflow is continuing to come out with additional functionality including the ability to compare revisions with ACF, implement the plugin on the frontend of WordPress, and more.

 

Conclusion

As already mentioned, I am thoroughly impressed by the functionality and features built into Oasis Workflow. I am going to be showcasing the plugin to several of my own clients over the next couple months, as I believe they could benefit from a content workflow submission process just like this.

The customized email notifications are nice features and ensure that the workflow is always moving forward. The additional add-ons that can accompany the plugin allow the functionality to be expanded upon.

 

Pricing

They offer a lite version of the plugin that is free and can be downloaded from the WordPress repository. When you’re ready to break out the full plugin, they offer three pricing models that all include the same features but are restricted to a certain amount of sites:

  • Up To 2 Sites – $79
  • Up To 6 Sites – $199
  • Unlimited Sites – $599

Find pricing info here.

I look forward to using the plugin more in live environments and I would encourage anybody else in need of post submission management to give Oasis Workflow a try!

The post Oasis Workflow Plugin Review – Manage Editorial Review Processes appeared first on WP Cover.

]]>
https://www.wpcover.com/oasis-workflow-plugin-review-manage-editorial-review-processes/feed/ 0
Move Yoast SEO Metabox To Bottom of Post Edit Screen – WordPress https://www.wpcover.com/move-yoast-seo-metabox-bottom-post-edit-screen-wordpress/ https://www.wpcover.com/move-yoast-seo-metabox-bottom-post-edit-screen-wordpress/#respond Sat, 11 Feb 2017 19:52:57 +0000 https://www.wpcover.com/?p=727 Quick code snippet for your Saturday morning.  I had a client asking about the Yoast Meta box and how her editors often missed specific WordPress custom fields because they did not scroll past the Yoast box to find them.  The client needed a way to push the Yoast SEO box all the way to bottom on […]

The post Move Yoast SEO Metabox To Bottom of Post Edit Screen – WordPress appeared first on WP Cover.

]]>
Quick code snippet for your Saturday morning.  I had a client asking about the Yoast Meta box and how her editors often missed specific WordPress custom fields because they did not scroll past the Yoast box to find them.  The client needed a way to push the Yoast SEO box all the way to bottom on the Post (or custom post type) edit/add pages.  Luckily, it was a very simply fix.  Add the following code snippet to your active themes functions.php file:

// Move Yoast to bottom
function wpcover_move_yoast() {
	return 'low';
}
add_filter( 'wpseo_metabox_prio', 'wpcover_move_yoast');

There you have it! Refresh your post edit or add new page and the Yoast SEO meta box should now be at the very bottom of the page. Happy weekend!

The post Move Yoast SEO Metabox To Bottom of Post Edit Screen – WordPress appeared first on WP Cover.

]]>
https://www.wpcover.com/move-yoast-seo-metabox-bottom-post-edit-screen-wordpress/feed/ 0
Generate Random Text String – PHP/WordPress https://www.wpcover.com/generate-random-text-string-phpwordpress/ https://www.wpcover.com/generate-random-text-string-phpwordpress/#respond Thu, 02 Feb 2017 04:22:16 +0000 https://www.wpcover.com/?p=719 With the recent backend systems I’ve been developing, I’ve often had the need to generate random text strings.  These are used for password reset hashes, email confirmation hashes, unsubscribe request hashes, and everything in between.  I quickly realized that a function needed to be created to handle these random text strings so here it is. […]

The post Generate Random Text String – PHP/WordPress appeared first on WP Cover.

]]>
With the recent backend systems I’ve been developing, I’ve often had the need to generate random text strings.  These are used for password reset hashes, email confirmation hashes, unsubscribe request hashes, and everything in between.  I quickly realized that a function needed to be created to handle these random text strings so here it is.  This function would go in your active themes functions.php file:

 

function generateRandomString($length = 20) {
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $charactersLength = strlen($characters);
    $randomString = '';
    for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, $charactersLength - 1)];
    }
    return $randomString;
}

The above function would generate a random text string that is 20 characters long and made up of numbers, lowercase characters, and uppercase characters. In order to utilize this function within your theme, you would simply call generateRandomString(), such as:

 

$emailhash = generateRandomString();

Easy right?

The post Generate Random Text String – PHP/WordPress appeared first on WP Cover.

]]>
https://www.wpcover.com/generate-random-text-string-phpwordpress/feed/ 0
Welcome 2017! Two Way Resume, Dock Skipper, Bold City + WP Cover https://www.wpcover.com/welcome-2017-two-way-resume-dock-skipper-bold-city-wp-cover/ https://www.wpcover.com/welcome-2017-two-way-resume-dock-skipper-bold-city-wp-cover/#respond Sun, 29 Jan 2017 05:37:18 +0000 https://www.wpcover.com/?p=715 Welcome to 2017 everybody! Exciting year to come.  The end of 2016 is always a time for reflection and goal setting before the New Year kicks in.  This last December, I was fortunate enough to have the availability to take a quick vacation and focus on what’s happened and exciting thing to come.  With so […]

The post Welcome 2017! Two Way Resume, Dock Skipper, Bold City + WP Cover appeared first on WP Cover.

]]>
Welcome to 2017 everybody!

Exciting year to come.  The end of 2016 is always a time for reflection and goal setting before the New Year kicks in.  This last December, I was fortunate enough to have the availability to take a quick vacation and focus on what’s happened and exciting thing to come.  With so many aspects of my life pulling me different directions, it’s nice to put a pen to paper and understand where you want to go.  So let’s take a look at some notes:

Two Way Resume

I cannot be more excited about what is in store for Two Way Resume in 2017.  A lot of work has been put into the platform over the last couple months and the it’s about to begin to take effect.  A completely re-designed dashboard has already been released and we just pushed a new frontend site live at https://twowayresume.com.  The website has become completely multilingual with these new releases.  We’re still waiting on our awesome translators to finish up their end of the work but we expect to launch in five additional languages over the next month.  Expect some posts on WP Cover about my first jump into custom multilingual development.

Outside of these early year releases, we have some exciting marketing tactics planned and new end user theme additions in 2017.

Dock Skipper

Poised for success in 2017, Dock Skipper is expected to grow due to increased demand for peer-to-peer dock sharing.  We have exciting partnership opportunities as well as new features planned for 2017.  Also in the works for 2017 is an insurance provider we hope to have insuring every booking made on the platform.

Bold City

Sister sites Bold City Design & Bold City Agency continue to grow and expand year-after-year.  Our development expertise continues to expand and is becoming second to none in Florida.  Experience with CMS systems & e-commerce continue to be our strong points and we’re excited to bring on some new brands in 2017.  Additional marketing services will be a priority for both of these companies in 2017 as we expand our product offerings further outside development.

WP Cover

As always, I plan to keep you all up to date via the WP Cover website.  Stay tuned for new development code snippets, tutorials, and general entrepreneurship posts.  This is going to be an exciting year and I am happy to have all of you on this ride with me!

The post Welcome 2017! Two Way Resume, Dock Skipper, Bold City + WP Cover appeared first on WP Cover.

]]>
https://www.wpcover.com/welcome-2017-two-way-resume-dock-skipper-bold-city-wp-cover/feed/ 0
WordPress Hack i2wp.org – How To Fix https://www.wpcover.com/wordpress-hack-i2wp-org-fix/ https://www.wpcover.com/wordpress-hack-i2wp-org-fix/#respond Fri, 02 Dec 2016 01:59:38 +0000 https://www.wpcover.com/?p=708 I recently brought on a new client who’s WordPress based site had been neglected.  As is typically the result, the site became compromised and their Google Adwords campaigns had been suspended and their site blacklisted.  They were looking for guidance ASAP. I began my normal process of combing through source code and running a couple […]

The post WordPress Hack i2wp.org – How To Fix appeared first on WP Cover.

]]>
I recently brought on a new client who’s WordPress based site had been neglected.  As is typically the result, the site became compromised and their Google Adwords campaigns had been suspended and their site blacklisted.  They were looking for guidance ASAP.

I began my normal process of combing through source code and running a couple scans on the file system.  Nothing seemed to catch my eye.  Luckily, there is another great source called File Viewer that saved the day.  File Viewer allows you to view the source code of your site based on the referrer and the user agent you would like to use.

After doing a search on File Viewer and examining the source code with Google as the referrer and Firefox as the User agent, it was evident that an extra script had been added in the footer: i2wp.org/jquery.js.  Got ya!

i2wporg-wordpress-hack

In the end, the site was compromised due to a plugin that had not been updated in some time.  Running my necessary scans, closing backdoors, and replacing all plugin and WordPress core files did the trick.

I’m happy to report that all Adwords campaigns are back running and the site has been removed from all blacklists.  Hope this helps somebody in a similar situation.

The post WordPress Hack i2wp.org – How To Fix appeared first on WP Cover.

]]>
https://www.wpcover.com/wordpress-hack-i2wp-org-fix/feed/ 0
How To Write A WordPress Plugin To Do “Random” Things https://www.wpcover.com/how-to-write-wordpress-plugin-random-things/ https://www.wpcover.com/how-to-write-wordpress-plugin-random-things/#respond Wed, 19 Oct 2016 22:35:43 +0000 https://www.wpcover.com/?p=694 Let’s face it, sometimes as developers we need to do ‘random’ things to organize data or put things in their correct places.  While WordPress provides an easy to use admin interface, it can still be time consuming completing repetitive or bulk tasks.  That’s why lots of people create plugins to make these tasks easier, quicker, […]

The post How To Write A WordPress Plugin To Do “Random” Things appeared first on WP Cover.

]]>
Let’s face it, sometimes as developers we need to do ‘random’ things to organize data or put things in their correct places.  While WordPress provides an easy to use admin interface, it can still be time consuming completing repetitive or bulk tasks.  That’s why lots of people create plugins to make these tasks easier, quicker, and sometimes automated.

With many of my projects lately, I’ve found the need to perform small, random tasks on hundreds and sometimes thousands of posts.  These tasks are ‘random’ to an extent meaning that there is not an existing plugin out there to do it for me and I will probably only need to do this task once.  So what do I do?  A while back I wrote just the shell of a plugin to do ‘random tasks’.  Basically it’s just a menu item added to the WordPress admin panel and when you press the Process Posts button, it does whatever task you have programmed for it to do.  It’s not fancy, it’s technical, but it works and it’s a great starting point if you’re a developer who needs to create a plugin to run a one-time ‘random’ task.  So here it is:

 

<?php
/**
* Plugin Name: Do Random Stuff - WP Cover
* Plugin URI: https://www.wpcover.com
* Description: Custom plugin by Cabe to do random repetitive tasks when and where I need it to be done. The "Heavy Lifter"
* Version: 1.0
* Author: Cabe Nolan
* Author URI: https://www.boldcitydesign.com
* License: GPL12
*/

/*---------------------------------------------------
add settings page to menu
----------------------------------------------------*/
function add_rstuff_import_page() {
add_submenu_page( 'tools.php', 'Do Random Stuff', 'Do Random Stuff', 'manage_options', 'import-rstuff', 'import_rstuff' );
}
add_action( 'admin_menu', 'add_rstuff_import_page' );

function import_rstuff() {
?>

<div class="wrap import-csv">
	<h2>Do Stuff</h2>
	<p>Click Process button to do whatever is below in your run process.</p>
<?php
	if ( isset( $_POST['_wpnonce-is-iu-import-users-users-page_import_cn'] ) ) {
	check_admin_referer( 'is-iu-import-users-users-page_import_cn', '_wpnonce-is-iu-import-users-users-page_import_cn' );
		$args = array(
			'posts_per_page'	=> -1,
			'post_type'		=> 'weddings',
			'post_status' => 'pending'
		);
		
		$the_query = new WP_Query( $args );
		if( $the_query->have_posts() ):
			while( $the_query->have_posts() ) : $the_query->the_post(); $i++;
			$parent_post_id = get_the_ID();
				  $my_post = array(
				      'ID'           => $parent_post_id,
				      'post_status'   => 'publish',
				      'post_date' => '1970-01-01 01:00:00'
				  );
				  wp_update_post( $my_post );
			endwhile; 
		endif; wp_reset_query();
	}
	?>

	<form method="post" action="">
		<?php wp_nonce_field( 'is-iu-import-users-users-page_import_cn', '_wpnonce-is-iu-import-users-users-page_import_cn' ); ?>
		<p class="submit">
		 	<input type="submit" class="button-primary" value="Process Posts" />
		</p>
	</form>
<?php } ?>

 

Looking at the above code, what is it doing? Pretty simple really, when we click the Process Posts button which is on a sub-menu under Tools, it’s looping through all posts created under the ‘weddings’ post type that have a current post status of pending. It’s changing each of those posts to a post status of publish and it’s changing the publish date back to 1970.

There ya have it! Nothing crazy but a great plugin foundation if you need to whip up a quick one time task and run it on your current WordPress install.

The post How To Write A WordPress Plugin To Do “Random” Things appeared first on WP Cover.

]]>
https://www.wpcover.com/how-to-write-wordpress-plugin-random-things/feed/ 0
Import Flickr Gallery Into WordPress Media Library Programmatically https://www.wpcover.com/import-flickr-gallery-wordpress-media-library-programmatically/ https://www.wpcover.com/import-flickr-gallery-wordpress-media-library-programmatically/#respond Tue, 04 Oct 2016 04:13:30 +0000 https://www.wpcover.com/?p=686 Last week I outlined the process for importing a single Flickr image shortcode into the WordPress media library programmatically. If you haven’t checked it out, give it a read first as it is a segue into this part two post. Today, we’re going to look at how to complete the same task except with a […]

The post Import Flickr Gallery Into WordPress Media Library Programmatically appeared first on WP Cover.

]]>
Last week I outlined the process for importing a single Flickr image shortcode into the WordPress media library programmatically. If you haven’t checked it out, give it a read first as it is a segue into this part two post.

Today, we’re going to look at how to complete the same task except with a Flickr Gallery, importing each image individually to the media library and then saving the media IDs to an Advanced Custom Fields gallery field.

Let’s jump right in. As mentioned, the base of the plugin will be pulled from our previous post so let’s start out with creating our basic plugin:

 

<?php
/**
* Plugin Name: Flickr Gallery Import - Custom
* Plugin URI: https://www.wpcover.com
* Description: Flickr Import Into WordPress
* Version: 1.0
* Author: Cabe Nolan
* Author URI: https://www.boldcitydesign.com
* License: GPL12
*/

/*---------------------------------------------------
add settings page to menu
----------------------------------------------------*/
function add_flickr_import_page() {
add_submenu_page( 'tools.php', 'Import Flickr Custom', 'Import Flickr Custom', 'manage_options', 'import-flickr', 'import_flickr' );
}
add_action( 'admin_menu', 'add_flickr_import_page' );

function import_flickr() {
?>

<div class="wrap import-csv">
	<h2>Import Flickr</h2>
	<p>Click Process button to run through posts and import data.</p>

Next, we’ll handle the processing of the Flickr gallery once the submit button has been clicked.

<?php
//some security checks
	if ( isset( $_POST['_wpnonce-is-iu-import-users-users-page_import_cn'] ) ) {
	check_admin_referer( 'is-iu-import-users-users-page_import_cn', '_wpnonce-is-iu-import-users-users-page_import_cn' );
	// setup our query args
	$args = array(
		'posts_per_page'	=> -1,
		'post_type'		=> 'post',
	);
	
	$the_query = new WP_Query( $args );
	if( $the_query->have_posts() ):
		while( $the_query->have_posts() ) : $the_query->the_post();
		$parent_post_id = get_the_ID();
		if(get_field('flickr_gallery')) { $i++;
			echo $parent_post_id . '<br />';
			$pieces = explode("=", get_field('flickr_gallery'));
			$photoid = substr(preg_replace('/\s+/', '',$pieces[1]), 0, -1);
			$api_key = 'yourapikey';
                        $flickr_userid = 'yourflickruserid';
			 
			$url = 'https://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos';
			$url.= '&api_key='.$api_key;
			$url.= '&photoset_id='.$photoid;
			$url.= '&user_id='.$flickr_userid;
			$url.= '&format=json&nojsoncallback=1';
			$response = json_decode(file_get_contents($url));
			$photo_array = $response->photoset->photo;
			//print_r($photo_array);
			$failedgal = array();
			if(!empty($photo_array)) {
				$galleryarray = array();
				foreach($photo_array as $photo) {
					$singlephotoid = $photo->id;
					 
					$url = 'https://api.flickr.com/services/rest/?method=flickr.photos.getSizes';
					$url.= '&api_key='.$api_key;
					$url.= '&photo_id='.$singlephotoid;
					$url.= '&format=json&nojsoncallback=1';
					 
					$response = json_decode(file_get_contents($url));
					$photo_array = $response->sizes->size;
					//print_r($photo_array);
					$photolabels = array();
					foreach($photo_array as $photo) {
						$photolabels[] = $photo->label;	
					}
					if(in_array('Large 1600', $photolabels)) {
						$label = 'Large 1600';
					} elseif(in_array('Large 1600', $photolabels)) {
						$label = 'Large';
					} else {
						$label = 'Original';
					}
					foreach($photo_array as $photo) {
						if($photo->label == $label) {
							$ogphoto = $photo->source;
							
							global $post;
							$filename = $post->post_name . '-' . rand(10000, 999999999) . '.jpg';
							$uploaddir = wp_upload_dir();
							$uploadfile = $uploaddir['path'] . '/' . $filename;
							$contents= file_get_contents($ogphoto);
							if(empty($contents)) { $failedgal[] = $parent_post_id; }
							$savefile = fopen($uploadfile, 'w');
							fwrite($savefile, $contents);
							fclose($savefile);
							
							$wp_filetype = wp_check_filetype(basename($filename), null );
		
							$attachment = array(
							    'post_mime_type' => $wp_filetype['type'],
							    'post_title' => $filename,
							    'post_content' => '',
							    'post_status' => 'inherit'
							);
							
							$attach_id = wp_insert_attachment( $attachment, $uploadfile, $parent_post_id );
							
							// Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
							require_once( ABSPATH . 'wp-admin/includes/image.php' );
							
							// Generate the metadata for the attachment, and update the database record.
							$attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
							wp_update_attachment_metadata( $attach_id, $attach_data );
							
							$galleryarray[] = $attach_id;
							
							
						}
					}
					
				}
				if(!in_array($parent_post_id, $failedgal)) {
					update_field('flo_gallery', $galleryarray, $parent_post_id);
					update_field('flickr_gallery', '', $parent_post_id);
				} else {
					echo $parent_post_id . ' Has Failed For Gallery Image.<br />';
				}
			}
		}
		endwhile; 
		endif; wp_reset_query();
	}
?>

First and foremost, make sure you swap out the Flickr API Key and the Flickr Username details with your info. The Flickr username is the username of the account for which you will be querying the gallery.

To jump into the functionality, this query is first looking to see if the ACF custom field flickr_gallery is not empty. This flickr_gallery field is where we are storing the shortcode in the format of [flickrset id=89236532753275].

If this custom field is not empty, we are using the Flickr API method called flickr.photosets.getPhotos to create an array of photos assigned to this gallery. Once we have that array set, we’re going to loop through each of those photos using the same flickr.photos.getSize method we used in part one of this tutorial. For each photo we are grabbing the appropriate size, adding it to the WordPress media library, and then adding the attachment ID to an array called $galleryarray.

Once we’ve looped through each photo in the Flickr photoset, we’re going to save the $galleryarray attachment IDs to another ACF custom field titled flo_gallery. Make sense?

As a final addition to the plugin, we need to add in our HTML form and close out the import_flickr() function we started like so:

	<form method="post" action="">
		<?php wp_nonce_field( 'is-iu-import-users-users-page_import_cn', '_wpnonce-is-iu-import-users-users-page_import_cn' ); ?>
		<p class="submit">
		 	<input type="submit" class="button-primary" value="Process Posts" />
		</p>
	</form>
<?php } ?>

We’ve now covered how to import single images from Flickr into the WordPress media library as well as Flickr Photo Sets (galleries). I hope this will help you take on your next Flickr to WordPress migration task!

The post Import Flickr Gallery Into WordPress Media Library Programmatically appeared first on WP Cover.

]]>
https://www.wpcover.com/import-flickr-gallery-wordpress-media-library-programmatically/feed/ 0
Import Flickr Shortcode Into WordPress Media Library Programmatically https://www.wpcover.com/import-flickr-shortcode-wordpress-media-library-programmatically/ https://www.wpcover.com/import-flickr-shortcode-wordpress-media-library-programmatically/#respond Tue, 27 Sep 2016 05:43:23 +0000 https://www.wpcover.com/?p=680 We’ve recently taken on a project at Bold City Design where we needed to export a large site from Joomla and import it into WordPress so I will be sharing some odds and ends on the project as we go through it. One major point of contention was their media which was nearly 100% stored […]

The post Import Flickr Shortcode Into WordPress Media Library Programmatically appeared first on WP Cover.

]]>
We’ve recently taken on a project at Bold City Design where we needed to export a large site from Joomla and import it into WordPress so I will be sharing some odds and ends on the project as we go through it.

One major point of contention was their media which was nearly 100% stored with Flickr and accessed via shortcodes.  As part of the transfer and re-development of this site, they wanted to import the photos into the natural WordPress media library.  After hitting the Google search queries, I did stumble across a plugin that showed some promise, https://wordpress.org/plugins/flickr-shortcode-importer/.  However, after some testing and below average results (I couldn’t even get this to work with custom post types?), I came to the conclusion that a custom plugin was going to be the way to go.

As mentioned, we had exported the posts from Joomla and were importing them into WordPress.  To make the process a little bit easier, we assigned the featured image Flickr shortcode to it’s own custom field during import.  So basically I had a bunch of posts in WordPress that had a custom field name of ‘flickr_featured_photo’ and a value that looked something like: ‘[flickr id=89236532753275]’.

Once my data was in place, I was ready to start developing the plugin.  To start, let’s get the basic plugin info added:

 

<?php
/**
* Plugin Name: Flickr Import - Custom
* Plugin URI: https://www.wpcover.com
* Description: Flickr Import Into WordPress
* Version: 1.0
* Author: Cabe Nolan
* Author URI: https://www.boldcitydesign.com
* License: GPL12
*/

/*---------------------------------------------------
add settings page to menu
----------------------------------------------------*/
function add_flickr_import_page() {
add_submenu_page( 'tools.php', 'Import Flickr Custom', 'Import Flickr Custom', 'manage_options', 'import-flickr', 'import_flickr' );
}
add_action( 'admin_menu', 'add_flickr_import_page' );

function import_flickr() {
?>

<div class="wrap import-csv">
	<h2>Import Flickr</h2>
	<p>Click Process button to run through posts and import data.</p>

Next, I’m going to add in my form processing (what happens after clicking the ‘Go’ button):

<?php
//some security checks
	if ( isset( $_POST['_wpnonce-is-iu-import-users-users-page_import_cn'] ) ) {
	check_admin_referer( 'is-iu-import-users-users-page_import_cn', '_wpnonce-is-iu-import-users-users-page_import_cn' );
	// setup our query args
	$args = array(
		'posts_per_page'	=> -1,
		'post_type'		=> 'post',
	);
	
	$the_query = new WP_Query( $args );
	if( $the_query->have_posts() ):
		while( $the_query->have_posts() ) : $the_query->the_post();
		$parent_post_id = get_the_ID();
		if(get_field('flickr_featured_photo')) {
			
			$pieces = explode("=", get_field('flickr_featured_photo'));
			$photoid = substr(preg_replace('/\s+/', '', $pieces[1]), 0, -1);
			$api_key = 'yourapikey';
			 
			$url = 'https://api.flickr.com/services/rest/?method=flickr.photos.getSizes';
			$url.= '&api_key='.$api_key;
			$url.= '&photo_id='.$photoid;
			$url.= '&format=json&nojsoncallback=1';
			 
			$response = json_decode(file_get_contents($url));
			$photo_array = $response->sizes->size;
			if(!empty($photo_array)) {
				$photolabels = array();
				foreach($photo_array as $photo) {
					$photolabels[] = $photo->label;	
				}
				if(in_array('Large 1600', $photolabels)) {
					$label = 'Large 1600';
				} elseif(in_array('Large 1600', $photolabels)) {
					$label = 'Large';
				} else {
					$label = 'Original';
				}
				foreach($photo_array as $photo) {
					if($photo->label == $label) {
						$ogphoto = $photo->source;
						
						global $post;
						$filename = $post->post_name . '-' . rand(10000, 999999999) . '.jpg';
						$uploaddir = wp_upload_dir();
						$uploadfile = $uploaddir['path'] . '/' . $filename;
						$contents= file_get_contents($ogphoto);
						$savefile = fopen($uploadfile, 'w');
						fwrite($savefile, $contents);
						fclose($savefile);
						
						$wp_filetype = wp_check_filetype(basename($filename), null );
	
						$attachment = array(
						    'post_mime_type' => $wp_filetype['type'],
						    'post_title' => $filename,
						    'post_content' => '',
						    'post_status' => 'inherit'
						);
						
						$attach_id = wp_insert_attachment( $attachment, $uploadfile, $parent_post_id );
						
						// Make sure that this file is included, as wp_generate_attachment_metadata() depends on it.
						require_once( ABSPATH . 'wp-admin/includes/image.php' );
						
						// Generate the metadata for the attachment, and update the database record.
						$attach_data = wp_generate_attachment_metadata( $attach_id, $filename );
						wp_update_attachment_metadata( $attach_id, $attach_data );
						
						
						if(!empty($attach_id)) {
							update_field('featured_photo', $attach_id, $parent_post_id);
							echo $ogphoto . '<br />';
							update_field('flickr_featured_photo', '', $parent_post_id);
						} else {
							echo $parent_post_id . ' Has Failed For Featured Image.<br />';
						}
					}
				}
				
			}
		}
		endwhile; 
		endif; wp_reset_query();
	}
?>

The above query is checking to see if the custom field ‘flickr_featured_photo’ is not empty within the post. If so, we are getting the Flickr image ID from the shortcode by exploding the string at the equal sign. We are then generating a URL to fetch the image from Flickr. For this example, I want to see if a Large 1600 image size exists within the fetched image, if so I want to grab it. As a second choice I’m looking just for a Large image, and as a fallback we’ll just grab the Original if neither options exist. As a side note, make sure you update the Flickr API key with your specific key. This can be found within your Flickr account.

Once we have the image, we’re assigning it the filename of the post for better SEO practice but appending some numbers to keep all filenames unique. Next, we are inserting the image data into the WordPress media library. Finally, if everything goes as planned, we are updating another ACF custom field named ‘featured_photo’ with the attachment ID and also removing the value from the field ‘flickr_featured_photo’ to signify that this post has been complete. Doing this last step solves any issues with server timeouts as you can always restart the process and it will leave off where it left off.

As a final addition to the plugin, we need to add in our HTML form and close out the import_flickr() function we started like so:

	<form method="post" action="">
		<?php wp_nonce_field( 'is-iu-import-users-users-page_import_cn', '_wpnonce-is-iu-import-users-users-page_import_cn' ); ?>
		<p class="submit">
		 	<input type="submit" class="button-primary" value="Process Posts" />
		</p>
	</form>
<?php } ?>

Thanks for following along, hopefully this assists with other migrations from Flickr to WordPress media library. In part two of this series coming out next week, we’ll also learn how to deal with Flickr Photosets and import them into an Advanced Custom Fields gallery custom field. Stay Tuned!

The post Import Flickr Shortcode Into WordPress Media Library Programmatically appeared first on WP Cover.

]]>
https://www.wpcover.com/import-flickr-shortcode-wordpress-media-library-programmatically/feed/ 0