Include jQuery (or anything) inside Custom Options Panel’s tag

the correct way to include files for scripts you can use the hook “admin_print_scripts” and include your scripts with wp_enqueue_script() for example: <?php add_action(‘admin_print_scripts’,’my_scripts’); function my_scripts(){ wp_enqueue_script( ‘jquery’ ); } ?> and for styles use the hook “admin_print_styles” and include you styles with wp_enqueue_style for example: <?php add_action(‘admin_print_styles’,’my_styles’); function my_styles(){ wp_enqueue_style( ‘myPluginStylesheet’, WP_PLUGIN_URL . ‘/myPlugin/stylesheet.css’ … Read more

How can i link a custom post type thumbnail to intermediate size

<a rel=”lightbox” href=”https://wordpress.stackexchange.com/questions/10191/<?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,”large’, true); echo $image_url[0]; ?>”> <?php the_post_thumbnail(‘thumbnail’); ?> </a> Yeah the above (posted by @null) is correct on getting the url, here it is all put together. Including the rel=lightbox. I call to WP’s large image size here personally for the lightbox image to be linked to. … Read more

WordPress Template Part in iFrame

create a .php file within the root WP folder: <?php define(‘WP_USE_THEMES’, false); require(‘wp-blog-header.php’); wp_nav_menu(array(‘theme_location’ => ‘my_menu’)); // change it with your menu location ?> and call it in your .html page (as a iframe). These only gets you the menu HTML, so you’ll also need to import the theme CSS styles. Not sure how iframe … Read more

do_shortcode() in twentyeleven theme

It looks like twenty ten displays the excerpt on category archives. If you’re using manual excerpts, this is an easy fix. Just add this line of code to your theme’s functions.php file. It tells wordpress to run the excerpt through the do_shortcode function/filter. add_filter( ‘the_excerpt’, ‘do_shortcode’ ); If you’re not using manual excerpts, we have … Read more