Custom Header added within Dashboard pages, is this possible with custom template files?

I created a custom template and called it Header Home"header-home.php" <?php /** * Template Name: Header Home */ ?> <?php if( have_post() ) { while( have_post() ){ the_post(); } } ?> Then on my front page i call it with <?php get_header( 'home' ); ?> Now, when i create a page, and use template "Header Home" and add my html content inside, it's not showing on the front page at all. Shouldn't the loop grab those html and add it …
Category: Web

How can I add a custom header to a custom template in a plugin without using the theme folders

There is a lot of documentation on how to create custom headers for a theme. For example, if I wanted to add a header named: header-custom.php I would add this to my template file: get_header('custom'); If custom-header.php was in either the same directory as the page template or the 'root' theme directory, the header will load as expected. I can't find anything for custom headers for page templates in a plugin. For example, I have a template file single-node.php located …
Category: Web

Additional custom header image

Has anyone seen a way to add a new header_image to a theme? I need to add two configurable images in a theme. It doesn't really matter if it gets added as a new "Header" admin theme menu or if it's added to the existing Apperance->Header menu. I'm a bit new to plugin development so any help in the right direction is appreciated. I can't really find any hooks or actions to attach to. Similar to this request
Category: Web

Modify wp-admin page header 'viewport' meta data

The 'wp-admin/admin-header.php' file outputs 'viewport' meta data. It seems the value of the viewport is hard coded into the file. (See: https://github.com/WordPress/WordPress/blob/master/wp-admin/admin-header.php line 89). I want to edit the viewport from my custom plugin. Are there any suggestions as to how this could be done? Any code injected via the hooks that follow the hardcoded viewport data has no effect and I cannot see any available hooks inside the section that occur before the hardcoded data.
Category: Web

Adding theme support for a custom header image

I'm using add_theme_support( 'custom-header', $defaults ); to support custom header images in my theme. The $defaults are described in the Custom Headers article $defaults = array( 'default-image' => '', 'random-default' => false, 'width' => 0, 'height' => 0, 'flex-height' => false, 'flex-width' => false, 'default-text-color' => '', 'header-text' => true, 'uploads' => true, 'wp-head-callback' => '', 'admin-head-callback' => '', 'admin-preview-callback' => '', ); There is no explanation in the Codex for the following. What do they mean? wp-head-callback admin-head-callback admin-preview-callback
Category: Web

My theme header is stuck on a low resolution image?

My responsive header is stuck on the medium-large srcset regardless of width UNLESS I'm in DevTools. I have disabled all CDN's and image resizing, but now this seems to be browser behavior i cannot control. Please take a look, then look at the image in DevTool. When set to the same width as the browser the image is clear, when I maintain width but turn off DevTools, the header image is now blurry. Can you help me? https://mccustage.wpengine.com/blog/
Category: Web

create a button in the header of the mobile menu in the middle of the logo and the menu accordion

good evening everybody, I would like to implement a button in the mobile menu in the header between the middle of the logo and the middle of the menu accordion (explanation in the image that I will send) I tried to do it but rarely it only works for me on a cell phone in the mobile version but in the others it is not also possible to see in the css search engine of google chrome, when you put …
Category: Web

How to enable admin to upload multiple images to support header carousel slider theme in WordPress?

I am creating a Bootstrap Carousel WordPress Theme. Thus Carousel Slider at the top of the pages is a part of theme which should be supported out of the box. That's why creating a separate plugin might not be a good choice, I think. If I enable Custom Headers in my theme as following, admin can upload multiple images using WordPress theme Customizer. But only one image is meant to be used as header image. function themename_custom_header_setup() { $args = …
Category: Web

How to insert a Button or custom text on twentyseventeen header

Is it possible to add a button, svg and extra text paragraph to header image on the twentyseventeen theme? This is an example of what look I'm trying to achieve https://github.com/ppass5/Childtheme_example_images/blob/master/Hero.png and where it sits currently https://github.com/ppass5/Childtheme_example_images/blob/master/Screen%20Shot%202018-08-20%20at%207.37.07%20PM.png. I'm guessing in involves PHP to the site-branding file, but not really sure. Thanks for the help!
Category: Web

Add helper text in custom-header section in admin

In my custom theme I created a custom header section : add_theme_support( 'custom-header', array( 'video' => true, 'flex-width' => true, 'flex-height' => true, 'width' => 1920, 'height' => 677, ) ); but I want to add some additional info in the admin area where you chose the images to upload, and if possible to change the default text that now is: "Click “Add new image” to upload an image... etc" Thank you.
Category: Web

Create custom API endpoint to change custom header image

My goal is to create a custom API endpoint that I can call with an API call that changes the custom header image in Wordpress to another image (which would be passed along the API call, or maybe just switch to another media file in Wordpress, or similar). UPDATE: I have now found the set_theme_mod() function which seems to be what I'm looking for, but when I tried to implement it I couldn't quite get it to work. The API …
Category: Web

Remove elementor header and display default theme header

I am using Elementor pro and I am using Tabor wordpress theme(Here theme link: https://themebeans.com/themes/tabor/). I create custom footer within elementor pro and I noticed that the default theme header is disappear. So I have to create custom header with elementor pro. But any how I want to keep the default theme header. Can you anyone help me?
Category: Web

Different custom header video on different pages

I have problem with creating multiple different video headers on different pages. I'm using lattest Wordpress 4.7 and using "Twenty Seventeen" template. For now i manage how to add "video header" to page different from front page, by adding in custom-header.php video-active-callback => 'is_page' This gave me option to set video at every page, but then i saw that i changed all headers at the same time. So my Question is, how to create separate headers, but if it is …
Category: Web

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.