WordPress converts media extention URL automatically to video player

You should consider using the Auto-embeds Disabler plugin here: https://gist.github.com/ocean90/3796628 Note that it’s actually just a single line of code, if you prefer to add that to your functions.php – but I’d suggest keeping it as a plugin so you can easily activate/deactivate that functionality. remove_filter( ‘the_content’, array( $GLOBALS[‘wp_embed’], ‘autoembed’ ), 8 ); Note that … Read more

Overwriting the menu break points of twentysixteen in child theme

Copy the js folder of the parent TwentySixteen theme to child theme root. Then add the below code in your functions.php– function the_dramatist_dequeue_scripts() { wp_dequeue_script( ‘twentysixteen-script’ ); wp_deregister_script( ‘twentysixteen-script’ ); } add_action( ‘wp_print_scripts’, ‘the_dramatist_dequeue_scripts’ ); function the_dramatist_twentysixteen_scripts() { wp_enqueue_script( ‘twentysixteen-child-script’, get_stylesheet_directory_uri() . ‘/js/functions.js’, array( ‘jquery’ ), null, true ); } add_action( ‘wp_enqueue_scripts’, ‘the_dramatist_twentysixteen_scripts’ ); Then … Read more

Adding an external HTML link to a post thumbnail

It sounds like you are trying to use get_permalink() on a URL. get_permalink() expects a post ID, not a URL. Try this: add_filter( ‘post_thumbnail_html’, ‘my_post_link_html’, 10, 3 ); function my_post_link_html( $html, $post_id, $post_image_id ) { // Uncomment for debugging. This will replace the featured image with the debugging output. // exit ( var_dump( $GLOBALS[‘ghostpool_affiliate_button_link’] ) … Read more

Create a custom taxonomy that will be used to create and filter markers in a Google Map

Here’s a fully working example to get you started. Register the “marker” taxonomy register_taxonomy( ‘marker’, ‘post’, array( ‘hierarchical’ => false, ‘update_count_callback’ => ‘_update_post_term_count’, ‘label’ => __( ‘Markers’, ‘textdomain’ ), ‘labels’ => array( ‘name’ => __( ‘Markers’, ‘textdomain’ ), ‘singular_name’ => __( ‘Marker’, ‘textdomain’ ), ‘menu_name’ => _x( ‘Markers’, ‘Admin menu name’, ‘textdomain’ ), ‘search_items’ => … Read more

how to en-queue jQuery to load before the tag

Try adding this to functions.php <?php // Custom scripting to move JavaScript from the head to the footer function remove_head_scripts() { remove_action(‘wp_head’, ‘wp_print_scripts’); remove_action(‘wp_head’, ‘wp_print_head_scripts’, 9); remove_action(‘wp_head’, ‘wp_enqueue_scripts’, 1); add_action(‘wp_footer’, ‘wp_print_scripts’, 5); add_action(‘wp_footer’, ‘wp_enqueue_scripts’, 5); add_action(‘wp_footer’, ‘wp_print_head_scripts’, 5); } add_action(‘wp_enqueue_scripts’, ‘remove_head_scripts’); ?>

Functions For Calling Specific Elements

It sounds like get_template_part() would do the trick. In element.php you could simply call get_template_part( ‘element-item’ );, which would then include the element-item.php file from your theme. You could wrap this up in a function if you wanted to, e.g. get_element(). function get_element() { get_template_part( ‘element-item’ ); } This approach would allow you to add … Read more

how can I just add to parent theme function(s) instead of redeclaring whole the function

I might have a solution for you. But, consider first using the default WordPress custom logo support. You just need to add this to your functions.php file: function theme_prefix_setup() { add_theme_support( ‘custom-logo’ ); } add_action( ‘after_setup_theme’, ‘theme_prefix_setup’ ); See more details about add_theme_support( ‘custom-logo’ ); at https://codex.wordpress.org/Theme_Logo. Now, if you click Appearance > Customize, under … Read more