I'm having trouble hiding my header on mobile devices. My wordpress theme does not have an option to hide it, so I was looking at the theme's header.php file if there was anything I could add to it. Haven't been able to figure out a solution, any ideas?? Thanks <?php /** * The header for our theme * * This is the template that displays all of the <head> section and everything up until <div id="content"> * * @link https://developer.wordpress.org/themes/basics/template-files/#template-partials …
How to add functionality of adding Textbox in own custom plugin simple page in which user add copyright year in textbox for ex.2022/2023 which will change value in my footer.php. Any help appreciated. Thank you.
I'm having a problem in fixing the footer always to the bottom of the page, also when there is not enough content in the page to fill it. I found a lot of similar questions online and all of them suggested as solution to add code similar to the following: footer { position: fixed; bottom: 0; left: 0; right: 0; } Here you can see the initial situation (footer in the middle of the page for empty content page): And …
There's a plugin putting scripts in the footer of my site seemingly with the rest of the enqueued scripts that have been enqueued with wp_enqueue_script( $in_footer = true ). However when I use the following code, these scripts are not present. var_dump(wp_scripts()); I know the handles for these scripts (without the -js at the end) and have tried deregistering and dequeuing these scripts with priorities from 0 to 99999999999. The code at the moment is: add_action( 'wp_enqueue_scripts', 'remove_unused_homepage_code' , 99999999999 …
I spent all day creating a custom theme based on the Monochrome Pro Genesis child theme. But, I just noticed it doesn't have any footer widgets areas in Appearance > Widgets. I looked at the theme documentation and it doesn't have footer widgets areas! I looked in funtions.php and the code is there for widget support.. //* Add support for 4-column footer widgets. add_theme_support( 'genesis-footer-widgets', 4 ); There are no remove_actions for the footer widgets. So, it seems like I …
I followed the directions at http://blog.frontendfactory.com/how-to-create-front-end-page-from-your-wordpress-plugin/ and it works but the header and footer do not load. Here is my page: http://pocket.consulting/bg-core/ UPDATE: I stand corrected... It appears the wp_head(); and wp_footer(); do load as it is altering the color, font, etc. Is there something else I have to call to get the entire look/feel?
Having an issue where I have a client who wants his Google Analytics code on just one page. I'm using the following is_page code but in the footer.php of my child theme, but it's not appearing on the page. Is this code correct? <?php if ( is_page( 'contact' )) { echo '<script type="text/javascript">/* <![CDATA[ */ var google_conversion_id = 000000000; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "000000000"; var google_remarketing_only = false; /* …
I have this html <a href="#1647278006925-e8321147-313b" data-vc-accordion="" data-vc-container=".vc_tta-container"><span class="vc_tta-title-text">LISTEN</span></a> that is printed in my page and opens an accordion with an iframe in it. The iframe: <iframe id="myiFrame" class="stop-lazy" data-src="https://some.iframe" frameborder="0" allowtransparency="true" style="width: 100%;min-height: 150px;"></iframe> I am trying to create a jquery code that will load the iframe only when the user click on the link. So i have tried to set the below script in the footer.php: <script> $(".vc_tta-title-text").click(function(){ var iframe = $("#myiFrame"); iframe.attr("src", iframe.data("src")); }); </script> but it …
I am using the twentynineteen default Wordpress theme but I would like to know how I can remove this line <?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?> only on certain pages in footer.php. Similar to this post: How to add a specific widget to only 1 page?. Basically, I would like to know how I can change a sections of a widget in a child theme on certain pages.
I am using woocommerce and the shoptimizer theme. I want to change the height of my footer background, the font size and the background hover colour (When pointer is over the link). Is there some code that I can add in order to do this? How do I add the code. I understand CSS but am not sure what is needed for this. (font-size, height etc) I have tried a two plugins but they throw out critical errors.
I want to display 4 column footer menu. but when I add new menu the wp_nav_menu create a < li > and add every menu items to it. now, how can I wrap every li element with a custom div tag with a class? I need this output : In the above image, you can see every menu is wrapped inside a div. I tried with wp_nav_menu() it does not help. As I'm new to WordPress theme development I don't …
I have an existing site that I am now trying to secure, but I'm running into problems with the header and footer on the pages that are accessed via custom links in the menu. When I try to access a custom link (such as http://mywebsite.com/SomeNonWordPressComponent), the content loads, but the header and footer render as: Moved Permanently The document has moved here (https://localhost/common/header.php). The header and footer on regular WordPress pages render perfectly fine. What do I have to change …
The header, footer, theme options went missing on the website. I am using the latest Bitnami WordPress Stack on Amazon Lightsail, Approach A: Bitnami installations using system packages. When I migrated my website to this new server, the header, footer, theme options went missing on the website. But doing the below solves the issue. I am not sure if this is the right thing do? or does it affect anything. If anyone has more knowledge about this, please let me …
Plugin class is using action-hook for wp_footer in it's init function to assing script to footer. In that callable it does do two things: Registers the script (with in_footer argument true) Enqueues the script This is somewhat bad design since registering and enqueueing is done in the same function. Also the fact that the script is registered quite late in wp_footer and with in_footer arg so why register it in wp_footer hook. And now, this script should be rendered in …
I cannot believe that this question has not already been answered, but the search does not come up with anything. If it has already been answered, please point me in the right direction! There are many options for "blank" or "starter" themes and plugins, but there seem to be no resources on how to completely remove the default header and footer without installing or modifying themes. Surely there is a simple way to do this within functions.php, just as you …
I have a multisite installation and try to output the main site's header & footer on all subsites. In header it's working fine: switch_to_blog( '1' ); do_action( 'generate_header' ); restore_current_blog(); But in footer the switch itself is working, as it outputs the main site's name, but it doesn't show the footer - it outputs only empty widget-areas, neither the ones from the main-site nor the ones from the subsite. switch_to_blog( '1' ); echo get_bloginfo( 'name' ); do_action( 'generate_footer' ); restore_current_blog(); …
New to WordPress development, long-time user though. Developing my own site. Have a rudimentary understanding of HTML / CSS. I'm using 2020 / twenty-twenty theme (child) and the main problem I'm having is when I resize the browser window the text does not act very responsive and just goes weird at one point: This is due to the Flexbox property. How do I eliminate / offset Flexbox in the Additional CSS? If there's no way to do so there, then …
I am working on my first plugin that adds a external script to the footer. Wordpress automatically adds the version number at the end, which I'm trying to remove. What I have so far: add_action('wp_enqueue_scripts', array($this,'print_code')); public function print_code(){ $location = get_option('location_select'); $url = 'https://' . esc_html($location) . '.domain.com/js/script.js'; wp_enqueue_script('myID', $url, array('jquery'), false, true); } This puts out the script correctly, but I still have the version (?ver=5.8) at the end. The false should avoid that, afaik. What am I …