Tag Info

Hot answers tagged

1

I guess you are talking about a specific page, for example domain.com/page? So you can create a generic page template (and select it for the page in WordPress admin panel) or create a template for the specific page. See instructions here. In this template you can add your php code for the redirect. If this redirection would be done for the whole site, not ...


1

NEVER EVER alter any template or file in a theme or plugin that you did not author, and this goes for any core file as well. There is no way to protect the code that you alter or add in any of those files, except maybe changing file permissions, but then again, you will run into other issues ALL customizations should and must be made in either a child theme ...


1

You can use the following functions: time (); return The time by seconds date(); y- Year m- Month d- Day h- Hours i- Minute s- Second for ex: date("Y-m-d H:i:s");


1

Try this - Add your button inside a form and write down script to add product to the cart and redirect user directly to the checkout page. Suppose, following is the button that you can put on single product page using a WooCommerce hook. <button name="checkout_now"> Checkout Now </button> PHP code: global $woocommerce; $post_id = ...


1

try this $post_id = 11; $post = get_post($post_id); $slug = $post->post_name; <a href="<?php get_site_url(); ?>/abstract/<?php echo $slug; ?>" title="<?php the_title_attribute(); ?>">Abstract</a>


1

I figured out the issue, my site had the following in wp-config.php. Also WP-config.php had to be placed at the site root define('FS_CHMOD_DIR', true ); define('FS_CHMOD_FILE', true ); define('FS_METHOD', 'direct'); Removing the above resolved the issue.


1

Your have two major issues here The string you are building is correct, but it gets overriden on each iteration of the loop, which at the end will only hold the info from the last post. You need to define your variable outside the loop and then concatenate your info to that variable across the entire loop in order for you to display all postdata from all ...



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