WordPress

Bootstrap Shortcodes for WordPress Alternatives

Sometimes there are support request on the WordPress plugin bootstrap shortcodes to provide advanced bootstrap components (e.g. table builder). There are 2 reasons bootstrap shortcodes is not that advanced as you might assume: You can’t edit generated shortcodes – it’s not a visual builder There are some components missing I think it’s sufficient for some people that want to take… Read more →

Find broken shortcodes

If you recently changed your theme and used shortcodes from it or disabled plugins you maybe want to find all leftovers of them because they are not translated any more. You will find things like [shortcode attribute=”bla”] all over website. Obviously you don’t want to review each post on your website to find them manually. So there comes a little… Read more →

WordPress change post_date for tests

If you want to create a post via the post factory in you tests you can do it like this:

Make sure to pass a date! Unix timestamps or other formats won’t work. This creates 2 posts with different dates. You can test the function getPostsInYear(2014) as follows:

Post1 should not be returned by getPostsInYear( 2014 ) because… Read more →

WordPress action or filter not called

If you are using the wordpress api to hook into actions or filters there are some pitfalls. But these pitfalls are not wordpress related but likely your faults. I wan’t to show how to NOT hook into wordpress. 1. add_action( "actionA", array( __CLASS__, "processA", 10, 3) ); Please check the array declaration. Stupid mistake, but it’s hard to locate the error. You can output $wp_filter and check… Read more →