WordPress Local And Live Site

My best practice to run a production system and keep a development version with a simple and easy configuration. Notice: This works super awesome on small wordpress websites. Create production and development configuration files: wp-config-dev.php (contains local database configuration, site url and debugging) _wp-config-live.php (contains production database config., live site url and disabled debugging configuration) … Read more

Get Image tag from content of post

You can either make use of get_children or get_posts or even WP_Query to get the the attached image ID’s to the current post You can then use those ID’s to gt the attached image with wp_get_attachment_image() Here is a basic idea that you can use in a widget or sidebar. (CAVEAT: Untested) $args = array( … Read more

How could I change my Permalink from blog to custom structure? [closed]

You don’t do that with your permalinks. You can do what you want in WordPress Settings. Go to your WordPress dashboard, 2. Click “Settings”, 3. Click General. 4. In the “Site Address (URL)” Box remove the “blog” part like this –> “http://site.myurl.com/ NOTE: DON’T CHANGE THE WORDPRESS ADDRESS URL!!! Only change the Site Address Here … Read more

How to get all tags of a custom post type by id

Loop approach: usually archive-{custom_post}.php file. FIRST: custom_post_plural Stands for a group of custom posts of certain type. Example of custom_post_plural: products custom_post_singular Stands for an individual custom post type. Example of custom_post_singular: product SECOND: var $args_custom_post_plural are the parameters of the WP_Query. var $custom_post_plural is the execution of the query. I used var $custom_post_plural_output to … Read more