Install and Running Supervisord in virtualenv python 2.7

The thing is your default python is 3.x and supervisord is not stable/ready yet for python 3.x so i suggest a solution is to run supervisord in virtualenv of python 2.7 virtualenv –python=/usr/bin/python2.7 env cd env ./bin/pip install supervisor Yes. You can first setup a virtualenv and then install supervisor use pip. virtualenv env cd env ./bin/pip install supervisor…

Change WordPress post date format to time ago

WordPress offers you a nice solution to change your WordPress date format or time format in general settings of your admin dashboard. However, some people may prefer to have so-called “time ago” format in the similar way to Twitter and Facebook style like posted “10 minutes ago”, “1 hour ago”, “3 hours ago”, etc… Here this…

How to Generate Password Strong Online

If you want a quick and easy way to make a strong password, there are plenty of ways to generate strong passwords online. Let’s take a look at some of the best that help you how to generate password strong online. 1. Generate Password Strong Online   Generator Password Strong is a simple way to make…

Get Featured Image URL programmatically

Post thumbnails are pretty useful and pretty easy to use in WordPress. Simply add: add_theme_support(‘post-thumbnails’); To a theme’s functions.php file and you’ll get a Featured Image module on the admin screen for posts which allows you to select one. It is also very easy to output that image as an HTML <img>: the_post_thumbnail(); But what if you just…

python strip html tags like strip_tags in php

Earlier this week I needed to remove some HTML tags from a text, the target string was already recorded with HTML tags in the database and one of the requirement specifies that in some specific page we need to render it as a raw text. I knew from the beginning that regular expressions could apply…

Searching Posts Programmatically in a WordPress Plugin

If I navigate to Posts -> All Posts in a WordPress install, there’s a Search Box in the upper right hand corner. Entering terms in this box and clicking the Search Posts button will perform a search. Does WordPress provide a hook, function, or other API that would allow me to programmatically perform the same (or a…

WordPress how to find where a shortcode comes from

Just use the Windows search bar in wp-content directory and search for companyName_apply_form. You should find the file where the shortcode is created. To add a shortcode in WordPress you normally use this syntax: ‘add_shortcode(“shortcode_name”, “function_name”)’ So with basic linux skills, you can find the function_name + file that define the shortcode_name grep “add_shortcode” * -r|grep submit_job_form ……

WordPress how to get current url woocommerce product

I am trying to get Woocommerce product permalink by given product name. I know I can get permalink by given product ID like this: $url = get_permalink( $product_id ); But I can not find any code to get it by product name. I tried this: $url = get_permalink( ‘title’ ); Or in the woocommerce template,…

WordPress Get ID of Current Category

Getting the ID of the current category in WordPress is actually quite simple. How can I retrieve slug of current taxonomy being viewed in taxonomy template? To further explain, lets say I am viewing category flowers so how can I retrieve slug of category flowers? We are going to use get_queried_object() to accomplish this task. The following…