This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="vpop" data-type="youtube" data-id="6xcG6ttMDVY" data-autoplay='true'>Youtube</div> | |
| <br /> | |
| <div class="vpop" data-type="vimeo" data-id="172052320" data-autoplay='true'>Vimeo</div> | |
| <!-- copy this stuff and down --> | |
| <div id="video-popup-overlay"></div> | |
| <div id="video-popup-container"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * | |
| * Force WordPress CPT portfolio to Have Excerpts | |
| * Check if $excerpt is empty and if so set post to draft | |
| */ | |
| if ( ! function_exists( 'envelopedlife_mandatory_excerpt' ) ) { | |
| function envelopedlife_mandatory_excerpt($data) { | |
| //change your_post_type to post, page, or your custom post type slug | |
| if ( 'portfolio' == $data['post_type'] ) { | |
| $excerpt = $data['post_excerpt']; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_filter( 'manage_edit-post_columns', 'aco_last_modified_admin_column' ); | |
| // Create the last modified column | |
| function aco_last_modified_admin_column( $columns ) { | |
| $columns['modified-last'] =__( 'Last Modified', 'aco' ); | |
| return $columns; | |
| } | |
| add_filter( 'manage_edit-post_sortable_columns', 'aco_sortable_last_modified_column' ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function ns_single_image_filter($size){ | |
| $tn_id = get_post_thumbnail_id( $post->ID ); | |
| $img = wp_get_attachment_image_src( $tn_id, $size ); | |
| $width = $img[1]; | |
| $height = $img[2]; | |
| if (has_post_thumbnail($post->ID )){ | |
| if ($width > $height){ ?> | |
| <?php the_post_thumbnail($size, array( 'class' => "ns-landscape") ); | |
| }else{ ?> | |
| <?php the_post_thumbnail($size, array( 'class' => "ns-portrait") ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Replaces the default excerpt editor with TinyMCE. | |
| */ | |
| class NS_Richtext_Excerpt | |
| { | |
| /** | |
| * Replaces the meta boxes. | |
| * | |
| * @return void | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // @ref http://rachelcarden.com/2012/03/manage-wordpress-posts-using-bulk-edit-and-quick-edit/ | |
| (function($) { | |
| // we create a copy of the WP inline edit post function | |
| var $wp_inline_edit = inlineEditPost.edit; | |
| // and then we overwrite the function with our own code | |
| inlineEditPost.edit = function( id ) { | |
| // "call" the original WP edit function | |
| // we don't want to leave WordPress hanging | |
| $wp_inline_edit.apply( this, arguments ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Plugin Name: NS inline edit | |
| * Plugin URL: https://www.nuno-sarmento.com | |
| * Description: Add excerpt to WordPress Posts Quick Edit | |
| * Requires at least: 5.0 | |
| * Tested up to: 5.4 | |
| * Version: 0.1 | |
| * Plugin Author: Nuno Sarmento | |
| * Author URI: https://www.nuno-sarmento.com |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| # Edit your CPT $args and add the below | |
| 'register_meta_box_cb' => 'prfx_featured_meta', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /********* DO NOT COPY THE PARTS ABOVE THIS LINE *********/ | |
| /* Change size for Yoast SEO OpenGraph image for all content | |
| * Credit: Yoast Development team | |
| * Last Tested: May 24 2019 using Yoast SEO 11.2.1 on WordPress 5.2.1 | |
| */ | |
| add_filter( 'wpseo_opengraph_image_size', 'yoast_seo_opengraph_change_image_size' ); | |
| function yoast_seo_opengraph_change_image_size( $string ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php echo cpt_custom_content( 'photo_competition', 'title' ); ?> | |
| <?php echo cpt_custom_content( 'photo_competition', 'content' ); ?> |