Tag Info

Hot answers tagged

1

Not sure if I'm understanding you correctly, but if you want to display a special of the day, depending on the day ... I have a rough representation of how you could go about doing so. Example: $current_day = date('N');// 1 (for Monday) through 7 (for Sunday) - daily/weekly //$current_day = date('j');// 1 to 31 - daily $specials = array( '', ...


1

I'd highly recommend WP-CLI for such tasks. It is a tool that allows installation and configuration of WordPress on the command line. What you are trying could easily be done: wp core download wp core config --dbname=<dbname> --dbuser=<dbuser> --dbpass=<dbpass> wp core install --url=<url> --title=<site-title> ...


1

If you are using Linux, you are lucky enough, there is a command line tool EasyEngine which lets you install your complete site in 5 3 minutes, It was publicly released recently at Wordcamp Mumbai 2014. Not just installation, but also provides you other options to manage sites. I'd say a really handy tool.


1

Does wordpress allow me to add a php file to the root directory to execute custom scripts? WordPress can't prevent you from adding PHP files to the root directory, but there is no builtin functionality to load those files. You can load them yourself but if you are not careful they will load outside of WordPress context, which is a painful way to work. ...


1

I can't think of any valid reason why you'd want to do what you're proposing to do. Wordpress has many hooks that you can use to run code at virtually any stage. For example add_action('init','some_function'); some_function() { do_stuff here } Would essentially run everytime wordpress is called (Ie:, page loaded) allowing you to do whatever you want. ...



Only top voted, non community-wiki answers of a minimum length are eligible