Tag Info

New answers tagged

0

What was the error that it "hiccups and spits"? I can also suggest, assuming it's an error with the include_once or require_once functions and without knowing what type of error you are encountering, that you ensure that the path you are providing is a directory path: require_once( plugin_dir_path( __FILE__ ) . "subfolder/*.php" ); And not a URI: ...


0

To explain in short, many theme authors (I do this as well) tend to organise their functions in smaller, more manageble files outside of the normal functions.php file. It makes locating a certain function easier, and it also organise and group functions together which relates to a certain aspect regarding the site Quick example: In my theme, I have a file ...


1

When it comes to the template hierarchy, WordPress will indeed look in the child theme directory before loading from the main theme. For all other non-specific WordPress files (like functions and 3rd party includes), it's entirely up to the main theme to decide how to load them. Unless the theme is using locate_template to load these includes, or is ...


0

Just change only function that you want to edit. See this post 1)Copy (in full) the function you want to override from the parent theme. 2) Paste it into functions.php in the root of your child theme’s folder. If functions.php doesn’t exist, create it. 3) Rename the function from parent_theme_function to child_theme_function. 4) Deactivate the parent ...


0

I have found the answer in another thread. Passing Variables through locate_template Essentially the WordPress function get_template_part changes the scope of the variable $user_choice. PHP default behaviour when using include() is that the variable from the current script is still available in the included file. However because get_template_part() is a ...


0

I'll put my money to it and say it has something to do with this line 'eventDisplay' => 'all', Can't make sense of what this line actually do. I would just remove it. Also, just a tip, do not use hyphens (-) in taxonomy or custom post type names. They will definitely be troublesome if it comes to custom templates. If you must, use an underscore (_) ...



Top 50 recent answers are included