plugin shortcode output

If you open the plugin file and find where the function add_shortcode(‘daisy’,’someotherfunction’); is, then you could simply call that function that the shortcode is pointing too. This code could be placed as follows in a plugin or the functions.php file of your theme: add_action( ‘admin_init’, ‘daisy_fun’ ); function daisy_fun(){ ?> <script type=”text/javascript” defer=”defer”> jQuery(document).ready(function(){ var … Read more

Modifying the HTML Output of Inserted Images

This filter checks if an anchor is in the html image send to the editor and if so adds rel and class to the anchor. function add_highslide_attr( $html ) { preg_match_all(‘/(<a[^>]*>)(.*)/i’, $html, $result); if( !isset($result) || !isset($result[1][0]) || ! $result[1][0] ) return $html; $anchor = $result[1][0]; if( strstr($anchor, ‘rel=”) ) $anchor = str_replace(“rel=””https://wordpress.stackexchange.com/questions/77460/,”rel=”highslide ‘, $anchor); … Read more

Edit custom HTML page from WP admin dashboard

If you want content to be editable via the dashboard, a static HTML file is not the road you want to take. Instead, create a custom page template, from which you call a custom header and footer. Both get_header() as well as get_footer() take an optional $name parameter to specify a specific template to call … Read more

PHP mixed with some JS code to update WordPress theme settings

The way I see, you could minimize code mixing storing the return value of get_theme_option(“bg_slideshow”) into a JS variable, although it would not solve the problem as whole: var themeOptBgSlideshow = <?php echo get_theme_option(“bg_slideshow”); ?>; if(themeOptBgSlideshow == 1){ /* Background Images */ var bg_slideshow = jQuery(“.bg_slideshow”).attr(“data-active”); if(bg_slideshow == 1) { jQuery.vegas(‘slideshow’, { delay: 8000, backgrounds:[ … Read more