Adding Custom Fields for Img in Posts

You should use the post thumbnail feature. Add support for this feature with this line in your functions.php file: add_theme_support( ‘post-thumbnails’ ); You can also set a new thumbnail size that will be cropped on new added photos to use this in your theme. Add this code to set a new thumbnail size (also in … Read more

WooCommerce permalinks [closed]

We use a method simular to this to generate product permalinks: Custom field values in permalink Annoyingly this supports one level of category only – not nested categories, so I believe what you want to do is not possible (but if anyone else has a solution I’d love to hear it!).

How do I create a custom wordpress slideshow plugin?

So… this is my slide show implementation: This is the code i use to create a slideshow based on the flexslider JQuery plugin (Thank you David!). It also gives the user a checkbox so he can chose what pictures to include in the slideshow, and what pictures to skip. The images are taken form the … Read more

Change page title from plugin

There’s a filter for that: function wpse_alter_title( $title, $id ) { // $id = $post->ID; // alter the title here return $title; } If you want to alter the “Protected” and “Private” titles, then you need other filters: // Preserve the “%s” – else the title will be removed. function wpse_alter_protected_title_format( $title ) { return … Read more

Google Analytics post views in WordPress? [closed]

Please check out the WordPress Post Analytics Plugin that we (WisdmLabs) have created. http://wordpress.org/extend/plugins/wordpress-post-analytics/ This is available on the WordPress plugin repository as a free download. We link your Google Analytics account to the plugin and pull data from the Analytics backend to showcase stats right inside any post. You have a choice of using … Read more

WooCommerce Product Page Loop – Output All Product Thumbnails

The second parameter on get_the_post_thumbnail takes the size of the image you want. You’re currently passing in: apply_filters( ‘single_product_large_thumbnail_size’, ‘shop_single’ ) but change that to apply_filters( ‘single_product_small_thumbnail_size’, ‘shop_thumbnail’ ) And you’ll have the smaller image size. You can also pass in “thumbnail” or any of the custom sizes you have in that spot without the … Read more

How to restrict Front-End Editor on a page?

From the GitHub-Wiki The ‘front_end_editor_disable’-filter Use this filter if you want to completely disable the plugin for certain URLs. Callback arguments: bool $disable: The current state. Default: false You can use conditional tags: Conditionals tags return bool true/false, which means, if you want to disable it on a page, simply use is_page(), as it returns … Read more

jQuery plugin only in one page/post

If you only want to use the library “jquery.typist” on one page you could just add it by the conditional is_page() but if you want to use it on more than one page you should just minifyi all your js-files into a single one and compress it and cache it. It is better to use … Read more