Category Archives: Wordpress

WordPress query posts my meta data

Description: On a WP powered site, if you add custom meta information, you might want to query the posts that have a particular meta information, like a custom post template. Solution: This is done very easy and safe using the … Continue reading

Posted in Wordpress | Tagged , , | 1 Comment

Facebook Instant Articles feed not being crawled

Description: After installing in WordPress one of the Facebook Instant Articles plugins, the feed can be seen in browser at https://www.example.com/feed/fb/ but the Facebook publishing tool can’t crawl it. Solution: Of course this can be a due to a series … Continue reading

Posted in Wordpress | Tagged , , , | Leave a comment

WordPress proper query_posts with real results

Description: WordPress query_posts() function is pretty powerful, and easy to read out. However, you need to know what you’re querying for, as very often the results are not the expected ones. The specific post meta query is covered here. Solution: … Continue reading

Posted in Wordpress | Tagged , , , , | Leave a comment

Move WordPress database

Description: Moving an existing WordPress database is the easiest solution for changing website domain, duplicating content and so on, when we don’t want to lose posts, configurations and other meta data. However, this brings along also the connection to the … Continue reading

Posted in SQL, Wordpress | Tagged , , | Leave a comment

Query posts in WordPress

Description: Querying through the posts can be useful for creating special container pages. Returning the posts you require is only a matter of using the right attributes. Solution: A query in WordPress looks like a series of GET variables: query_posts(‘posts_per_page=-1&cat=’.7.’&orderby=title&order=ASC’) … Continue reading

Posted in Wordpress | Tagged , , , , , | Leave a comment

Requirements for sending e-mails from PHP

Description: We need to send e-mails directly from a PHP script. Solution: First, in php.ini┬áthe smtp port should be set to 25, but this is usually by default. To locate your php.ini file in the server configuration you can use … Continue reading

Posted in Linux, PhP, Wordpress | Tagged , , , , , , | Leave a comment

Load different config files in in WordPress single implementation

Description: Having multiple databases on the same implementation of WordPress, you need to select the proper config file before running a selected script from command line Solution: Just add a parameter that describes the correct config you need, for example … Continue reading

Posted in Best practices, Script, Wordpress | Tagged , , | Leave a comment