Browser title script ignoring is_page /else conditional [closed]
OK, All-in-one-SEO pack was interfering with my decalration. Solved.
OK, All-in-one-SEO pack was interfering with my decalration. Solved.
Constants can not be redefined that easily. https://stackoverflow.com/questions/8465155/redefine-constants-in-php So, the constants from child themes will be used instead of parents one. Though, there will be a warning, but that shouldn’t create any problem if you disable warning. You should add constants like this if you don’t want any warning: if ( !defined(‘CONSTANT’) ) define(‘CONSTANT’, ‘constant_value’); … Read more
WordPress.org does not have any hard requirements for code styles for plugins or themes. In the plugin guidelines, the relevant section is #4, “Keep your code (mostly) human readable.” Mainly it is about obfuscation. The most relevant line is this: We recommend following WordPress Core Coding Standards. Note the word recommend, there. This is not … Read more
Probably because a thing like a favicon is not necessarily tied to the on-page design, but to the branding of a site in general. In other words: it’s not specifically part of the “display” of the site. If a theme does choose to implemented it, an ender user might not want it (opt-in only) or … Read more
Try using get_current_site_name() to insure you get the site name so something like this: echo get_current_site_name(get_current_site());
How to use the filter single_product_archive_thumbnail_size I’ve searched for the tag single_product_archive_thumbnail_size in woocommerce repository on github. There is only the single occurrence of it as you see here. So how do we use it? The author’s of WooCommerce added this filter so that other developers would be able to modify the product’s archive thumbnail … Read more
Actually bloginfo( ‘stylesheet_url ) uses get_stylesheet_uri() function, so there is no difference. get_stylesheet_uri() is newer
add_action() uses add_filter() behind the hood. function add_action( $hook_name, $callback, $priority = 10, $accepted_args = 1 ) { return add_filter( $hook_name, $callback, $priority, $accepted_args ); } Source: https://developer.wordpress.org/reference/functions/add_action/ So basically it doesn’t matter if you use add_filter or add_action. But it doesn’t mean you should, using the appropriate function for a event will make your … Read more
In function passing a attachment id or thumbnail id NOT post id. Try this <?php global $post; $attch_id = get_post_thumbnail_id( $post->ID ); $url = wp_get_attachment_image_src($attch_id); echo “<img src=””.$url[0].”” />”; ?> I hope is useful.
For an general overview about hooks take a look at the codex page about the Plugin API: This article is specifically about the API of “Hooks”, also known as “Filters” and “Actions” Besides that there is valuable information specifically about customizing the login and registration form available at the codex: Customizing the Login Form You … Read more