wordpress-theming
WooCommerce – where can I edit HTML generated by hooks?
But what is this? Where does it come from?? Is there any clue in the action name as to where I could locate the HTML being generated for the purpose of editing it? This is an action hook. It isn’t doing anything by itself per say, but the functions listed in the comments hook into … Read more
Template Dropdown not showing up within WordPress administrator page
If you have disabled or removed the style.css from the template directory then also it will not work. So there must be the style.css on template directory then the templates directory will be shown. When you try to remove the style.css from the template directory or using style.css from css folder, then you must be … Read more
WordPress Docker won’t increase upload limit
it worked for me as follows: i created uploads.ini alongside of docker-compose.yml with following lines. this is exactly how it stated in fist post. file_uploads = On memory_limit = 500M upload_max_filesize = 500M post_max_size = 500M max_execution_time = 600 after this i added volumes: – ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini to my .yml file as it states in first … Read more
How to integrate WordPress template with CodeIgniter
First step is to move CodeIgniter and the WordPress files in their own directory. After that, put the following line at the top of your CodeIgniter’s index.php file. Change the path to wp-blog-header.php as needed to point to your WordPress’s root directory. <?php require(‘../wp-blog-header.php’); Then, you can use the following functions inside your views: <?php … Read more
How do I generate a custom menu/sub-menu system using wp_get_nav_menu_items in WordPress?
For anyone who tackles something similar here’s my solution: Quick code example on a gist Here’s the code on a github gist for anyone who wants to get in on the copy paste action. TL;DR TL;DR Loop over list, drill down if there’s a sub menu, close if we reach the end of the sub … Read more
How do I create different editable sections within a WordPress page?
Unfortunately adding multiple editable fields in a single page is not particularly easy using WordPress by itself. Many WP devs I know (myself included) rely on the Advanced Custom Fields Plugin for additional content fields. The steps to make this happen: 1) Install the ACF the plug. 2) In the settings area for ACF create … Read more
How to disable theme updates on WordPress to avoid losing my changes?
Increase the version number in the style.css to something really high, and you should stop getting the update notices.
WordPress path url in js script file
According to the WordPress documentation, you should use wp_localize_script() in your functions.php file. This will create a Javascript Object in the header, which will be available to your scripts at runtime. See Codex Example: <?php wp_localize_script(‘mylib’, ‘WPURLS’, array( ‘siteurl’ => get_option(‘siteurl’) )); ?> To access this variable within in Javascript, you would simply do: <script … Read more
Can WordPress be replaced by a Framework like Django or Ruby on Rails?
You can achieve the same frontend with WordPress, but what you will not be able to achieve is the speed and scale – and most importantly, maintainability – of an application based on a more application-oriented architecture. WordPress is highly flexible, but it’s also slow, and needs an awful lot of TLC to be able … Read more