Slider gets hidden behind navbar. How to put slider revolution below the navigation bar in incubator theme?

I have increased height of navbar and customized logo size and position to center. After increasing height, half of the slider gets hidden behind the navigation bar. here is the website. https://almashier.com/ I tried adding some padding between slider and navbar but The header is sticky and adjusts height on scroll which causes gap on scroll.
Category: Web

Menu custom link not working for external site

I've got this header menu in my site (made editing a theme), but i've noticed that the custom links pointing at local anchor section (like #section) correctly navigate in the same page to the desired location, but an external link won't work, even if specifing "open in new tab". I suppose something is preventing the menu link to open, or worse, the external link is not supported in that theme. Since i'm noob, where should i look for the menu …
Category: Web

Admin bar and fixed header issue?

I've styled my header to have a fixed top position. While logged in to wordpress, the wp admin nav bar covers the top section of my header making imposible to access my top navigation. I would like for the wp admin nav to push my top navigation below so both are visible. Does anyone know of any solution to fix this problem? An example of my problem can be found at... www.nickriversdesign.com/dev
Category: Web

Modifying child theme's header

I'm a noob. I have copied the header.php from the parent theme, I have added some snippets and things work. However, I would like to be able to add those same snippets either using a plugin or via functions.php so when/if the theme is updated, I don't need to redo everything. I've tried many things but none of them work. I wonder if the problem is where the snippets are placed by using a plugin or that the HTML element …
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

wp_redirect() - headers already sent

I am trying to use wp_redirect() to redirect the user after successfully submitting a signup form on the page. It's not working and shows the following error: Warning: Cannot modify header information - headers already sent by (output started at /Applications/MAMP/htdocs/theme/wp-content/themes/test/header.php:10) in /Applications/MAMP/htdocs/theme/wp-includes/pluggable.php on line 1178 I understand there has been already output before, that's why it's not working, but I have no clue how to make this work. The signup form gets rendered by a function, and is submitted …
Category: Web

Sticky header for wordpress changes size and logo size as I scroll down

I am using Themify to construct my website. I have a parallax site partially constructed, however when I scroll down my logo and header changes size. It is a sticky header and goes from being transparent to a color. Where can I find the options to change this in the themify builder? I just want to keep the size consistent as I scroll down. Here is the site: http://willwiseman.us
Category: Web

Cannot load admin-ajax.php. No access-control allow origin*

I cannot load admin-ajax.php and I keep getting this error message: XMLHttpRequest cannot load ..../wp-admin/admin-ajax.php.,. No 'Access-Control-Allow-Origin' header is present on... On local WAMP it worked just to add this: header("Access-Control-Allow-Origin: *"); (Even if this seems very stupid because next time WordPress updates I guess this would disappear.) When I upload this to my production server it's still the same message: XMLHttpRequest cannot load ..../wp-admin/admin-ajax.php.,. No 'Access-Control-Allow-Origin' header is present on... I've tried to modify the .htaccess file and that …
Category: Web

Custom endpoint and X-WP-TotalPages (headers)

I have a custom endpoint defined like so: add_action( 'rest_api_init', function () { register_rest_route( 'menc/v1', '/crosscat/(?P<dept>[\w-]+)/(?P<cat>[\w-]+)', array( 'methods' => 'GET', 'callback' => 'dept_cat_api', 'args' => array( 'dept' => array( 'sanitize_callback' => function($param, $request, $key) { return sanitize_text_field( $param ); } ), 'cat' => array( 'sanitize_callback' => function($param, $request, $key) { return sanitize_text_field( $param ); } ), 'per_page' => array( 'default' => 10, 'sanitize_callback' => 'absint', ), 'page' => array( 'default' => 1, 'sanitize_callback' => 'absint', ), 'orderby' => array( 'default' …
Category: Web

How to duplicate a page template but make minor changes to the header?

I will apologize in advance, I am very new to this. I have been teaching myself php as a hobby, but now I need it for work! I don't work as a web designer, but to try and save some money, I need to be able to make minor changes to our website. I can handle most things... But this one issue is throwing me for a loop. The page was designed by a "marketing firm" and the code is …
Category: Web

404/500 error on content images if Referer header is from another domain

Not very familiar with WordPress so I'm not sure what's causing this. Essentially, we have a few image assets stored under wp-content. When we access some assets (i.e. cmssubdomain.apex.com/wp-content/image.png) we are getting some peculiar behavior around the Referer request header: It works if accessed without the Referer header It works if accessed with the Referer header as long as the value matches the cms subdomain It fails once the Referer header is set to a value different than the subdomain …
Category: Web

Modify wp headers on specific page

I'm trying to change the cache-control header of a specific post (1234). I tried adding the following to the end of my functions.php: add_filter('wp_headers', 'wp_test_headers'); function wp_test_headers($headers) { if ( is_single ( 1234) ) { $headers['Cache-Control']="no-store, no-cache, must-revalidate, max-age=0"; } return $headers; } However when I open the page of the post in my browser, the condition is never met. Should I be adding the filter elsewhere, or is there another issue?
Category: Web

WP_REST_Response - How to return Gzip answer and add Content-encoding header?

This code runs correctly : function get_travelbooks($request) { global $tsp_mdlObj; $result = $tsp_mdlObj->read_travelbooks(); return new WP_REST_Response($result, 200); } Now I would like send a gzip answer. So I try : function get_travelbooks($request) { global $tsp_mdlObj; $result = $tsp_mdlObj->read_travelbooks(); $result = gzencode(json_encode($result), 9); $response = new WP_REST_Response($result, 200); $response->header('Content-Encoding', 'gzip'); return $response; } But this code doesn't work. The content of $result before gzencode(json_encode is an array : Array ( [0] => stdClass Object ( [id] => 5 [name] => travel …
Category: Web

WordPress plugin with CORS

I have couple API routes that I want to use on another site by making ajax calls, however, I keep getting Cross-Origin Read Blocking (CORB) blocked cross-origin response. I have tried CORS PLUGINS setting it to wildcard (*), also have tried numorous answers in this and other communities to no avail. add_action( 'init', 'allow_origin' ); function allow_origin() { header("Access-Control-Allow-Origin: *"); } also tired this add_action( 'rest_api_init', 'add_custom_headers', 15 ); function add_custom_headers() { add_filter( 'rest_pre_serve_request', function( $value ) { header( 'Access-Control-Allow-Headers: …
Category: Web

How to download CSV from sub directory in uploads folder

hello guys i donot have experience working with the csv. I have a very big form i wanted to make a custom csv export for this form and a new csv is generated every time the form is submited. i am using gravity form and gravity form gform_post_submissiom hook to capture the entry. Everything is working fine until this point. I have created a sub dir in uploads folder. Csv for every entry is being created in this folder. I …
Category: Web

Placing a featured image into header

How can I place featured images into the header, so each post has it's featured image within the main header? Also on category archive pages and the main news page, the featured images are being used in the traditional way, using the custom post image so is there a way around that too, where I can use the featured image for both posts and header. Maybe there is a way of having two custom thumbnail images and calling one up …
Category: Web

Changing ALT-tag for logo in wordpress

I've been working on a site for someone and I've been debating whether or not to take a risk with something. I haven't really worked a lot with .php in the past, but I know that a few mistakes in there can screw a lot of things up massively. I want to change the alt-tag for the logo that's displayed and usually they just had a normal alt-tag in the past. Now I've come across a .php-file which has ".$site_title." …
Category: Web

How to change the width of certain paragraph or header blocks?

Most of the time I like having the blocks the full width of my site (https://princetonfireandsafety.com/), but sometimes I just want to have a single header or paragraph block that isn't that big. Like if the text is only one or two lines, it looks really weird spanning the whole page (ie. The section on my page titled "Did you know that store bought fire extinguishers still need to be certified for your business?" I'd only want a bit wider …
Category: Web

About

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