my site footer is not showing.. any help please

i can't seem to find my footer since it disappeared unfortunately. i hereby attach the source code if anyone can help </div> </div> <!-- CORE : end --> <?php // Add custom code before footer do_action( 'lsvr_townpress_footer_before' ); ?> <!-- FOOTER : begin --> <footer id="footer" <?php lsvr_townpress_the_footer_class(); ?> <?php lsvr_townpress_the_footer_background(); ?>> <div class="footer__inner"> <?php // Add custom code before footer widgets do_action( 'lsvr_townpress_footer_widgets_before' ); ?> <?php // Footer widgets get_sidebar( 'footer-widgets' ); ?> <?php // Add custom code after …
Category: Web

How do you remove header sitewide from mobile only?

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 …
Category: Web

Wordpress footer always at the bottom of the screen-page

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 …
Category: Web

Can't deregister / dequeue scripts in WordPress

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 …
Category: Web

How do I add footer widgets to the StudioPress Monochrome Pro theme?

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 …
Category: Web

Front End Page Not Loading Header Footer

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?
Category: Web

Google Analytics tracking code on just one page?

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; /* …
Category: Web

On click load iframe

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 …
Category: Web

How to customize a section of a widget only on certain pages or page

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.
Category: Web

Code for changing the size of the footer block (background) and font size

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.
Category: Web

How to wrap the list with custom class using wp_nav_menu?

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 …
Category: Web

Header and footer fail to load with SSL and custom links

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 …
Category: Web

Defining path of content folder in WP-config solves the issue of missing header, footer, theme options. Is this a good approach? Expert Advice needed

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 …
Category: Web

Moving Javascript from footer to header

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 …
Category: Web

How do you completely remove the default header and footer using functions.php?

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 …
Category: Web

switch_to_blog() + do_action('generate_footer') not working in multisite

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(); …
Category: Web

Im having trouble centering menu items in footer due to "flexbox"

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 …
Category: Web

How can I remove the Wordpress-Version (?ver=5.x) from my plugin

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 …
Category: Web

About

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