New answers tagged

2

Without actually knowing what you're trying to achieve I see the following problems: $post variable is not defined in your widget() method. Try setting it using $post = get_post( get_the_ID() ) for instance. By the time you call foreach ($posts as $post) { ... } $posts variable is also not set. You need some query for this one I guess - WP_Query() or ...


0

You can do this by using 'the_content' filter. That way, Wordpress will treat the content as it was came from the editor field and execute all the shortcodes: <?php $meta = get_post_meta($post->ID, 'intSlider', true); ?> <div id="sliderWrap"> <div id="slider" class="floatLeft"> <? echo apply_filters('the_content', $meta); ...


0

I've fixed it by creating the following tiny plugin: <?php /* Plugin Name: Fix "Add Media" button in WordPress 4.5 Plugin URI: twitter.com/ojeffery Description: The 4.5 update of WordPress changed to the most recent version of JQuery, which broke the Add Media button when you call wp_editor via the front end. This tiny plugin fixes it by ...


0

By default no action url will mean that the form will be sent to the URL the page was loaded from. Once it is done, the code evaluating the shortcode is checking in the form was submitted and process it. This is not not a great way to write a from processing code, as the evaluation of shortcodes happens too late for doing something like redirect on success. ...


0

Provided you've confirmed that WP's native 'suggest' script is actually being rendered on the page properly (ie. you're using the correct template for home vs front-page), sometimes to avoid script conflicts on the page, you need to wrap your script in an anonymous function. So something like: <script> (function($) { ...



Top 50 recent answers are included