Articles of themes

blank white page when post/update/change option etc

regards , i have a problem in theme i make it after test the theme on localhost i tried it on a host : when i try post , update , change option i got blank white page then i enabled Debugging mode it gives me those errors Notice: register_sidebar was called incorrectly. No id […]

searchform.php doesn't work properly

I made a searchform.php file to custom my search widget as I read, but when I use the search widget, it doesn’t make the searches well, it sarches in the page of the categorie i’m writing. Is there anything wrong with my code? <form role=”search” method=”get” id=”searchform” class=”searchform” action=”<?php esc_url( home_url( ‘/’ ) ); ?>”> […]

Issue when posting updates/changes to wordress

I have WordPress 4.8.1 installed with the OCMX “Department” theme for WooCommerce. Whenever I update a page or post a new page/slider, I get the following error message: Warning: Declaration of obox_theme_update::fs_connect($directories = Array) should be compatible with WP_Upgrader::fs_connect($directories = Array, $allow_relaxed_file_ownership = false) in /home/…/wp-content/themes/department/ocmx/includes/update-class.php on line 4 Warning: Cannot modify header information – […]

What $handle does WordPress use for a theme's implicit style.css?

Assume that we have a theme named parent_theme. This theme’s style.css will be automatically included in the styles we deliver to the client. My question is – when WordPress “includes” style.css, what $handle does it use? By $handle, I mean within the context of wp_enqueue_style(). I started digging through the code to find the answer, […]

Full screen nav menu block with avada theme

I have a menu structured exactly how I want it but I need the style to be a bit more refined and specific. I’m using the avada theme with mega menu functionality, and I’ve applied it to the first link here: However, I want my dropdown to be full width completely and house the […]

Why does wordpress add Theme not list a specific theme anymore?

I used a theme on a wordpress site that I liked and now a year later I cannot find that theme for a second installation in any of the add themes tabs. Does it get removed when not updated or downloaded? Or is it only when the theme developer removes it manually?

Getting the teaser text without overriding global variables

I am trying to make a WordPress theme, following the WordPress Coding Standards – WPCS. In functions.php, I have a function to get only the teaser (text above the read more-tag). The function works, however I get an error from Code Sniffer that Overriding WordPress globals is prohibited Any suggestions on how to achieve this, […]

Set a featured image as a replacement to the header image

I am setting a header image as a background image to the .blog__header block via inline styles in functions.php: $header_image = get_header_image(); if ( $header_image ) { $header_image_css = ” .blog__header { background-image: url({$header_image}); }”; wp_add_inline_style( ‘theme-styles’, $header_image_css ); } now I want to replace this header image with a featured image if set: $header_image […]

Removing the references to the wp-content folder

I downloaded an HTML template and did the necessary conversions to create a wordpress theme. The location of the template files is in /wp-content/themes. When I look at my template and I go to my website, the URL is simple However, initially when I clicked on any of the links, the URL was […]

How can I use my custom wordpress theme on two websites?

I’ve built a custom wordpress theme for a website, and now I want to apply the same theme to another site. I could easily do this by duplicating the website and changing the content, but then subsequent changes to the theme won’t be carried over (and I foresee a lot of changes that will need […]