I am using WordPress 3 and would like to backup the database to my computer (a Mac). My webhost is using PHP safe mode, so that sometimes limits what plugins I can use. What is a good way to do a database backup? Is it possible to be automated? Are incremental backups recommended/easy? Obviously I […]
I’m using get_pages() function to get all subpages from a page like this: $childrens = get_pages(array(‘child_of’ => 7, ‘sort_column’ => ‘post_date’, ‘sort_order’ => ‘DESC’, ‘depth’ => -1)); This is supossed to get me a list of all pages (no matter if direct children, children of children, etc) orderen by the date they were created, but […]
I am using Multi-site installation. I don’t want all the widgets appear under widgets.php on dashboard .So I tried to find a way to remove or hide unnecessary widgets . SO that the new sub-sites under my Multi-site created won’t have much widgets. So the users don’t get confuse with lot of widgets . I […]
WordPress documentation, bloggers, and StackExchange answerers have done a great job of describing the code you write to make a custom REST endpoint, but I cannot find any documentation that describes exactly WHERE you place the code. Say I have an endpoint that I want to return the string “foo”. From my reading, I implement […]
Is there a way to have a custom template php file that is only used for previews instead of it using the single.php file? This way the user knows they are in preview mode?
Due to a complex multisite config, I have a query which combines the posts from two blogs and I would like to paginate the results. I am grateful for any help. I have posted my query. $latestposts = $wpdb->get_results( ” (SELECT * FROM net_5_posts INNER JOIN net_5_term_relationships ON net_5_posts.ID=net_5_term_relationships.object_id WHERE post_type = ‘post’ AND post_status […]
I’m working with a custom post type that uses the normal WordPress categories. I am able to modify my category template to display my custom post types exactly how I want them. The problem is, once I do this, normal blog posts are also affected. Of course I can limit either normal blog posts or […]
Here is an interesting question. I have recently noticed that if you utilize the code remove_meta_box(‘slugdiv’, ‘post’, ‘normal’); you are actually unable to modify the slug when you click on the url slug under the page title. To clarify, when you use remove_meta_box for the slugdiv, the metabox and the screen options get removed however […]
How to remove comment section from page only , not from posts pages?
I need to do check the inserted post for certain keywords and perform some functions depending on the keywords found. is there a wordpress hook that executes “just before the post is inserted into the database” ? Or will i have to modify wordpress core ? Also, i will need to prevent the post from […]