Unable to give correct path in wordpress

Use: get_template_directory() and or get_stylesheet_directory() E.g. in zumper/layouts/america.php <?php include get_template_directory() . ‘/inc/york.php’; //etc… Note: get_template_directory Retrieves the absolute path to the directory of the current theme. get_stylesheet_directory Retrieve stylesheet directory Path for the current theme/child theme. So if your theme is a child theme and or you want to provide the ability for a … Read more

Wierd site output [closed]

This looks like a hack, probably in W3TC. Try disabling all the Plugins one by one, and if it doesn’t go away, try switching to the default theme. If that did not work, install WordPress from scratch, and transfer the database to it. If you prefer another debug mode, I suppose your script gets hooked … Read more

Must use Plugin not updating HTML code in head

I have solved my problem by adding $myCode -> change_url(); and add_action(‘wp_head’, array($myCode, ‘print_header_scripts’)); <?php class some_code { function change_url() { $domain_name = $_SERVER[‘SERVER_NAME’]; $country_code = get_country_code(); if ($country_code == “PK”) { header(“location: http://///////////////”); exit(); } else if ($country_code == “AU” && $domain_name !== “au.cacricketbats.com”) { header(“location: https:///////////////////” . parse_url($_SERVER[‘REQUEST_URI’], PHP_URL_PATH)); exit(); } } function … Read more

Plugin create pages and use templates

I got it. It kind of makes sense but doesnt really. The one template wasnt working becuase I was looking for just the slug. Since its a child of the other page I needed to add it in the is_page statement. This worked (I also just did it all in one function): function ch_register_page_template($page_template;) {////////////////<————-Works … Read more

Disable submit button order

Fixed the issue. Was calling the incorrect IDs. Below is the code I used for anybody else wanting to achieve the same outcome. <script type=”text/javascript” charset=”utf-8″> jQuery(document).ready(function($){ $(“.button#place_order”).click(function () { $(“.button#place_order”).attr(“disabled”, true); $(‘.checkout’).submit(); }); }); </script>