Tag Info

New answers tagged

0

In your child theme, set the priority on the wp_enqueue_scripts hook to run later than the parent theme, and do your dequeue/re-enqueue there. Right now, your child theme code dequeues the original script on a later hook than your enqueue code. function enqueue_parent_theme_style_and_js() { wp_dequeue_script( 'jscript_custom' ); ...


2

They are the translatable strings. When developing a theme, if you need the theme to be translated to another langauge then you need them. __() — Reference: http://codex.wordpress.org/Function_Reference/_2 and there are many: http://codex.wordpress.org/L10n Learn more: http://codex.wordpress.org/Translating_WordPress ...


1

It seems like you're actually asking three questions here; it's likely your question will be put on hold because of this. Why do you need to add a custom post type? If you're interested in learning how to develop for WP you can skip the plugin for members and instead read the WP Codex entry on user roles and capabilities; this will let you limit who has ...


0

hey please include style sheet like this <?php add_action( 'wp_enqueue_scripts', 'enqueue_parent_theme_style' ); function enqueue_parent_theme_style() { wp_enqueue_style( 'parent-style', get_stylesheet_uri() ); } and also stylesheet not require to load jQuery so please change your code to like this if ( ! function_exists( ...


0

You don't need to change the core file. They're classes which means they can be extended. It'll require a bit of leg work but all you need to do is load an instance of the class and then extend/add to it. That's the beauty of OOP.That's if there isn't a hook to modify things with already, which there probably will be.


0

You should never modify WordPress Core. The people who recommend you do this are mistaken. The reason for this is that when you update WordPress you loose all of your changes. It also means assumptions plugins make about how Core work can be broken by your changes. Instead, if you need to change Core behaviour, remove things, add things, or modify them, you ...


1

I think your problem is how your function is constructed and not your condition as such. You should not be wrapping your function and your action in a condition like this. Page templates are selected really late in the query by the main query, and I probably think that this is way to late for your action to execute. By the time the condition hits true, the ...


0

Please Provide Proper path to enqueue scripts and styles Example- function theme_name_scripts() { wp_enqueue_style( 'style-name', get_stylesheet_uri() ); wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true ); } add_action( 'wp_enqueue_scripts', 'theme_name_scripts' ); then it will work fine


4

As @cybmeta already pointed out, you are too early with your removal. So you have to defer the actual removal, for instance like so: add_action( 'after_setup_theme', 'wpdev_170663_remove_parent_theme_stuff', 0 ); function wpdev_170663_remove_parent_theme_stuff() { remove_action( 'after_setup_theme', 'et_pb_setup_theme' ); }


1

The functions.php file of child themes is loaded right before the parent theme functions.php, so when you run remove_action in child theme, the action you are trying to remove doesn't exist beacuse it is added later.


0

No, unfortunately this is inherent limitation of PHP templates used in WordPress natively. You will have to override either this template file, or file(s) which include it, but in any case something will have to be replaced on whole file scope. There is no clean way to load template file partially in WordPress, which is handled by template inheritance ...


0

Yes, it is typically possible to re–create arbitrary markup in WordPress. However the difficulty of the task varies from easy to highly challenging. Sometimes it is easier to bend to markup WordPress gives you, than bend markup to precise state. For navigation menus there are basically two levels of control over markup: As per wp_nav_menu() documentation ...



Top 50 recent answers are included