Adding a simple Javascript file with a plugin
I think you are missing the trigger… your javascript should be something like this in order for it to trigger when the page is loaded: $( document ).ready(function() { alert( “ready!” ); });
I think you are missing the trigger… your javascript should be something like this in order for it to trigger when the page is loaded: $( document ).ready(function() { alert( “ready!” ); });
This code requires both a width greater than or equal to 1, and a caption. You could try removing these lines: if ( $atts[‘width’] < 1 || empty( $atts[‘caption’] ) ) return $content; That may affect other functionality, but it is the point where the script skips the image entirely.
I am not sure that you can put a function inside that statement (or that particular function). But I would test the process by using this test code $permalink = get_permalink(); $loginurl = wp_login_url($permalink); echo “permalink is $permalink<br>”; echo “loginurl is $loginurl <br>”; Turn on error logging/display to see any errors. And all of this … Read more
If it is post-thumbnail, it will return the ID:- <?php $post_thumbnail_id = get_post_thumbnail_id( $post_id ); ?> try this.
I found my answer here : https://wordpress.stackexchange.com/a/214883/71314 function remove_feed( $feedname ) { global $wp_rewrite; if ( in_array( $feedname, $wp_rewrite->feeds ) ) { $wp_rewrite->feeds = array_diff( $wp_rewrite->feeds, array( $feedname ) ); } $hook = ‘do_feed_’ . $feedname; // Remove default function hook remove_all_actions( $hook ); add_action( $hook, $hook ); return $hook; } Usage: remove_feed( ‘feed’ );
I want to store all the user entered information into the MySQL database. In this case, you can use the plugin called Flamingo, which stores all of your messages submitted through Contact Form 7. It’s actually made by the same plugin author.
When I first started working with foreach loops, this particular syntax seemed mysterious to me, too, and it wasn’t until I needed it that its usefulness became obvious. Works that way for a lot of “things you see in code.” Anyway, to answer the question, in the sample code, using as $key => $value makes … Read more
when you are at the post URL, you don’t need to work with referer (which is not reliable moreover) but with $GLOBALS[“post”] because you are in the PHP code which generate the page then you can have the post ID with that : $post_id = $GLOBALS[“post”]->ID;
The post_category parameter has to be an array, try this: $post = array(‘post_type’=>’post’, ‘post_author’=>$author, ‘post_status’=>’publish’, ‘post_title’ => ‘Test Title’, ‘post_category’ => array(‘679′) ); Ref: http://codex.wordpress.org/Function_Reference/wp_insert_post#Parameters If that doesn’t work for you, try using category_name: ‘category_name’ => ‘category_name’,
It really is rather simple. Check out the Codex on Page Templates for more info. Make a copy the existing page.php file located inside your WordPress theme’s folder. Rename your page.php file to page-mypage.php At the very top of your new page-mypage.php file, right after the opening <?php tag add the following code to define … Read more