Sahifa Theme Setting Configuration and Optimization

Sahifa Theme Setting Configuration and Optimization

Sahifa Theme Setting
Sahifa Theme General Settings
Sahifa Theme Header Settings
Sahifa Theme Archive Settings
Sahifa Theme Post Settings
Style.css Customization
How to Buy Sahifa Theme
How to Update Sahifa Theme Manually
How to Update Sahifa Theme by FTP/ cPanel

Sahifa Theme Setting

All configuration setting of Sahifa Theme is described and show below with diagram

Sahifa Theme General Settings

Sahifa Theme General Settings

Sahifa Theme Header Settings

Sahifa Theme Header Settings

Sahifa Theme Archive Settings

Sahifa Theme Archive Settings

Sahifa Theme Post Settings

Sahifa Theme Post Settings
Sahifa Theme Post Settings

Style.css Customization

Header

theme-header {
background: #FFF;
margin: 20px auto 25px;
border-top: 0px solid #f88c00; /* babu – Original – border-top: 3px solid #f88c00; */
position: relative;

Top Menu Styles

top-nav {
background: #2d2d2d; /* babu – original #fbfbfb */
border-bottom: 1px solid #ececec;
height: 31px;

top-nav ul li:hover > a,
top-nav ul:hover > a,
top-nav ul li.current-menu-item a {
color: #F88C00; /* babu – original 000 */

WPML language switcher

.top-nav .social-icons a {
color: #F88C00; /*babu – original #555 */

/* Top Nav Social */

.top-nav .social-icons a {
color: #F88C00; /*babu – original #555 */

Main Nav

main-nav {

margin: 0 auto;
background: #2d2d2d;
box-shadow: inset -1px -5px 0px -1px #393939;
min-height: 52px;
border-bottom: 0px solid #F88C00; /* babu - original - border-bottom: 5px solid #F88C00; */

height: 52px;
line-height: 57px;
border-width: 0 !important;
margin: 5px auto; /* babu – add */

Breaking News

.breaking-news span.breaking-news-title {
background: #F43D2A;
display: block;
float: left;
padding: 8px 10px 0;
height: 32px;
color: #FFF;
font-family: BebasNeueRegular, arial, Georgia, serif;
font-size: 14pt;
line-height: 15px; /* babu – add */

Homepage Blocks

.stripe-line {
background: url(images/stripe.png);
height: 12px;
overflow: hidden;
margin-top: 5px;
display: none; /* babu – add*/

.cat-box .entry a.more-link,
.archive-box .entry a.more-link {
margin-top: 0;
float: right; /* babu – add */

.cat-box-content,

sidebar .widget-container,

/* .post-listing, / / babu -post-listing class is separated below */

commentform {

background: #FFF;
border-bottom: 4px solid #F88C00;
-webkit-box-shadow: 0 0 3px #CACACA;
   -moz-box-shadow: 0 0 3px #cacaca;
        box-shadow: 0 0 3px #CACACA;

}

.post-listing /* babu – this class is separated from the above */
{
background: #FFF;
border-bottom: 0px solid #F88C00;
-webkit-box-shadow: 0 0 3px #CACACA;
-moz-box-shadow: 0 0 3px #cacaca;
box-shadow: 0 0 3px #CACACA;

Tabbed Widget

tabbed-widget .widget-top {
background: #23282D; /* babu – original – background:#F7F7F7; / height: 46px; border-bottom: 3px solid #EAEAEA; padding: 0px 0 0 2px; / babu – original – padding: 8px 0 0 2px; */
margin: -10px -10px 10px;
}

tabbed-widget ul.tabs li a {

display: inline-block;
text-align: center;
color: #FF0000;     /* babu - original - color: #666; */
padding: 5px 9px 1px;
line-height: 30px;

}

tabbed-widget ul.tabs li a:hover {

color: #FF0000;   /* babu - original #000 */

Social Icons Widget

.social-icons.social-colored .fa-rss:before,
.arq-lite-rss a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-rss a i {
background: #f8bc2e;
border-radius: 90px; /* babu – add */

.social-icons.social-colored .fa-facebook:before,
.social-facebook,
.author-social a.social-facebook:hover,
.arq-lite-facebook a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-facebook a i {
background: #39599f;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-twitter:before,
.social-twitter,
.author-social a.social-twitter:hover,
.arq-lite-twitter a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-twitter a i {
background: #45b0e3;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-stumbleupon:before,
.social-stumble,
.author-social a.social-stumble:hover {
background: #eb4924;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-google-plus:before,
.social-google-plus,
.author-social a.social-google-plus:hover,
.arq-lite-google a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-google a i {
background: #fa0101;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-linkedin:before,
.social-linkedin,
.author-social a.social-linkedin:hover {
background: #65b7d2;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-pinterest:before,
.social-pinterest,
.author-social a.social-pinterest:hover {
background: #E00707;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-youtube:before,
.social-youtube,
.author-social a.social-youtube:hover,
.arq-lite-youtube a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-youtube a i {
background: #cc181e;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-instagram:before,
.social-instagram,
.author-social a.social-instagram:hover,
.arq-lite-instagram a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-instagram a i {
background: #3897f0;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .fa-behance:before,
.social-behance,
.author-social a.social-behance:hover,
.arq-lite-behance a:hover i,
.arqam-lite-widget-counter.colored .arq-lite-behance a i {
background: #1769ff;
border-radius: 90px; /* babu – add */
}

.social-icons.social-colored .tieicon-flickr:before,
.social-flickr,
.author-social a.social-flickr:hover {
background: #ff0084;
border-radius: 90px; /* babu – add */

Pagination

.pagination {
overflow: hidden;
margin-bottom: 25px;
background-color: #DCDABF; /* babu – add back colour */

Background Change Demet

/* =Menu
————————————————————– */

.menu {
background-color: #0A90B7;
background-image: none;
}

.menu a {
text-shadow: 0 0 0;
}

.menu a:hover{
background-color: #B5304A;
background-image: none;
color: #333333;
text-shadow: 0 0 0;
}

.current_page_item a:hover {
background-color: #B5304A;
background-image: none;
}

/*
/babu – delete post date and author/

.post-meta { display:none; }

/babu – no comments/

.nocomments {
display: none;
}

/babu – Remove the words ‘You are here’ in breadcrumbs/

.breadcrumb-title {
display: none;
}

/babu – slider navigation/

navigation{

margin-bottom:0;
align:center;
}

*/

Underline hover to navigation items

.home #footer-widgets {
display: none;
}

Pagination

a.flex-prev:before, a.flex-next:before, #post-gallery .pagination .jcarousel-prev:before, #post-gallery .pagination .jcarousel-next:after {
color: rgba(0, 0, 0, 0.6);
font-size: 24px;
left: 0;
position: absolute;
top: 2px;
}

Subscribe Button

connect .newsletter-form .email {
width: 60%; /babu – original 60%/
background: #fff;
padding: .6em;
color: #888; }

How to Buy Sahifa Theme

At first create account on theme forest. After purchasing your will get below mail

Hi Mashiur,
Thanks for buying with us. Below is a summary of your recent purchase. You can download your purchased item at your Downloads page and view your invoice(s) on your statement here.

Question 1 : Where can I input license number into Sahifa Theme

Answer:

Hi,

Thanks for using our theme!

You don’t need to input the license key in the theme options page to activate the theme. license validation will be added in the future updates.

Best Regards!

Question 2: I purchased sahifa theme arround 3 months ago. Previously I generated a ticket about license activation. I asked where I will input license number. You replied no need to input license, because theme will update automatically. Still I can see my theme version is 5.7.1. But I can see in internet 5.7.2 is released. May I know how can my site will update automatically

Answer: We didn’t mention that the theme will be updated automatically,

You need to update the theme manually or via the Envato Market Plugin https://tielabs.com/knowledgebase/how-to-update-the-theme-without-losing-tiepanel-settings/

Best Regards!

Question 3: Featured Images and all other images is not showing after opening a post. 90% of my post affected after purchase your theme. I have around 1000 post This problem occurs when I have purchase theme from you. This is big issue for me. For example: https://autogarment.com/bom-management-software-material-system/

Answer:

Hi,

Thanks for using our theme!

One of the plugins used on your site causes a JS error that stops the lazyload feature, Please try these common solutions:

  1. Update everything including WordPress, the theme and plugins. Available updates appear in Dashboard > Updates.
  2. Deactivate all plugins in case there is a conflict. If the problem goes away while all plugins are inactive, then reactivate them one by one to determine which is causing the problem.
  3. Clear cache in both your browser and in any caching plugins that you are using (also disable services like CloudFlare, if used with your website).
  4. Revert code changes if you have modified the theme’s code. If using a child theme, reactivate the parent theme.

Best Regards!

How to Update Sahifa Theme Manually

  1. Download theme form themeforest
  2. Go to Appearance >> Themes >> Activate another default Wp theme
  3. Delete the inactive Sahifa theme
  4. Click on Install theme >> through Upload
  5. Now activate Sahifa theme

How to Update Sahifa Theme by FTP/ cPanel

  1. Download theme form themeforest
  2. Go to wp-content/themes/
  3. Delete and override the Sahifa folder files with the new ones

Tutorial

Topicslink
Divi Themeyoutube.com/watch?v=ax3vG2P_kFk
Divi Theme- Fashionyoutube.com/watch?v=_EvECJeqJZI
How to Edit Wp Config Php From Dashboard

How to Edit Wp Config Php From Dashboard

WordPress Wp-config.php Configuration Scripts

WordPress Wp-config.php Configuration Scripts

<?php
/**

  • The base configuration for WordPress
    *
  • The wp-config.php creation script uses this file during the installation.
  • You don’t have to use the web site, you can copy this file to “wp-config.php”
  • and fill in the values.
    *
  • This file contains the following configurations:
    *
  • * MySQL settings
  • * Secret keys
  • * Database table prefix
  • * ABSPATH
    *
  • @link https://wordpress.org/support/article/editing-wp-config-php/
    *
  • @package WordPress
    */
    \
    // ** MySQL settings – You can get this info from your web host ** //
    /** The name of the database for WordPress / define( ‘DB_NAME’, ‘database_name_here’ ); \ /* MySQL database username / define( ‘DB_USER’, ‘username_here’ ); \ /* MySQL database password / define( ‘DB_PASSWORD’, ‘password_here’ ); \ /* MySQL hostname / define( ‘DB_HOST’, ‘localhost’ ); \ /* Database charset to use in creating database tables. / define( ‘DB_CHARSET’, ‘utf8’ ); \ /* The database collate type. Don’t change this if in doubt. / define( ‘DB_COLLATE’, ” ); \ /*#@+
  • Authentication unique keys and salts.
    *
  • Change these to different unique phrases! You can generate these using
  • the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}.
    *
  • You can change these at any point in time to invalidate all existing cookies.
  • This will force all users to have to log in again.
    *
  • @since 2.6.0
    / define( ‘AUTH_KEY’, ‘put your unique phrase here’ ); define( ‘SECURE_AUTH_KEY’, ‘put your unique phrase here’ ); define( ‘LOGGED_IN_KEY’, ‘put your unique phrase here’ ); define( ‘NONCE_KEY’, ‘put your unique phrase here’ ); define( ‘AUTH_SALT’, ‘put your unique phrase here’ ); define( ‘SECURE_AUTH_SALT’, ‘put your unique phrase here’ ); define( ‘LOGGED_IN_SALT’, ‘put your unique phrase here’ ); define( ‘NONCE_SALT’, ‘put your unique phrase here’ ); \ /#@-/
    \
    /
  • WordPress database table prefix.
    *
  • You can have multiple installations in one database if you give each
  • a unique prefix. Only numbers, letters, and underscores please!
    / $table_prefix = ‘wp_’; /*
  • For developers: WordPress debugging mode.
    *
  • Change this to true to enable the display of notices during development.
  • It is strongly recommended that plugin and theme developers use WP_DEBUG
  • in their development environments.
    *
  • For information on other constants that can be used for debugging,
  • visit the documentation.
    *
  • @link https://wordpress.org/support/article/debugging-in-wordpress/
    / define( ‘WP_DEBUG’, false ); \ / Add any custom values between this line and the “stop editing” line. / \ / That’s all, stop editing! Happy publishing. / \ /* Absolute path to the WordPress directory. / if ( ! defined( ‘ABSPATH’ ) ) { define( ‘ABSPATH’, DIR . ‘/’ ); } \ /* Sets up WordPress vars and included files. */
    require_once ABSPATH . ‘wp-settings.php’;

Edit Wp Config Php

At first you need to changing the following lines:

define(‘DB_NAME’, ‘database-autogarment’);
define(‘DB_USER’, ‘database-mashir’);
define(‘DB_PASSWORD’, ‘database-12345’);
define(‘DB_HOST’, ‘localhost’);

Change wordpress table prefix

$table_prefix= 'wp_';

define(‘WP-HOME’,’http://localhost:8080/yourwordpresssite’);
define(‘WP-SITEURL’,’http://localhost:8080/yourwordpresssite’);

How to solve – PHP: display_errors  1 to 0 ?

To change the display_errors setting to 0 in WordPress, you can follow these steps:

1. Access your wp-config.php file:
Use file manager to access the wp-config.php file in your WordPress installation's root directory.

2. Edit the wp-config.php file:
Open the wp-config.php file in a text editor.

3. Locate the define('WP_DEBUG', true); Line:
If this line exists, comment it out by adding a double slash (//) before it.

4. Add the define('WP_DEBUG_DISPLAY', false); Line:
Add this line to the wp-config.php file. This will prevent PHP errors from being displayed on the frontend of your website.

5. Save the wp-config.php file:

Here is the chat: NC-RWN-0550
Save the wp-config.php file.

6. Refresh your website:
Refresh your website and check if the "Save has failed" error is resolved.
7. or add the below codes instaead of define('WP_DEBUG', true);

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);
How to Edit Wp Config Php From Dashboard

Apache Server Tutorial for Httpd Conf file of WordPress

Apache Server Tutorial

Apache Server Tutorial for Httpd Conf file of WordPress – Sometimes blocking port 80 can be challenging. In that can, you can configure XAMPP in windows to work over port 8080 rather than port 80.

To make this you need to open the XAMPP control panel but don’t start MySQL or Apache. Click on Apache (httpd.conf) option.

Alternatively, you can find in this location to C:\xampp\apache\conf\httpd.conf to open the file.

Now Search Listen 80 and change it to Listen 8080.

Now again find the lineServerName localhost:80 and change that value to ServerName localhost:8080. After change restart XAMPP

Port 80 should not use now. Instead that you should see Apache now running on ports 443 and 8080.

There are two more additional things you have to do to make this change work:

  1. Use http://localhost:8080/ to access all web rather than http://locahost/.
  2. If you had already installed any WordPress sites in localserver prior to changing the port, you will need to update the WP_HOME and WP_SITEURL definitions in wp-config.php manually to reflect the new domain prefix.

define(‘WP-HOME’,’http://localhost:8080/yourwordpresssite’);
define(‘WP-SITEURL’,’http://localhost:8080/yourwordpresssite’);

Php Ini Configuration for WordPress Websites

Php Ini Configuration

Php Ini Configuration

By changing some value of php.ini file we can increase memory limit and other configurations. File location is C:\xampp\apache\bin\php.ini for XAMPP. For online you will get Under Public_Html. By default it may not exist in Public_Html. So you can create a empty php.ini file here for configuration

Definition of php.ini Settings

expose_php = Off: hide php code and version. Hide your PHP code from being viewed from a browser or scraped from a bot.

allow_url_fopen = On : disables retrieving data from remote locations using php ftp or http proto

allow_url_include = Off: disables attaching files to urls that can be written back into the database

display_errors = Off : Disable displaying errors to screen

log_errors = on: Enable writing errors to server logs

enable_dl = Off: enable_dl is on by default and allows open_basedir restrictions, which limit the files a script can access, to be ignored. For that reason, it’s a dangerous option and should be explicitly turned off.

file_uploads = On: allows wordpress uploads

max_execution_time = 30: Kills processes that are stuck or taking longer than 30 seconds to complete. Uploading video or audio can take longer that 30 seconds.

max_input_time = 30: Kills processes that are stuck or taking longer than 30 seconds to complete. Adjust this to fit your needs. Uploading video or audio can sometimes take longer that 30 seconds.

memory_limit = 40M: Kills processes that are stuck or taking longer than 30 seconds to complete. Adjust this to fit your needs. Uploading video or audio can sometimes take longer that 30 seconds.max_input_vars = 1000

post_max_size = 516M : It is maximum file upload size

session.gc_maxlifetime = 1440: This value 1440 seconds defines how long an unused PHP session will be kept alive. E.g. A user logs in, browses through your application or web site, for hours, for days. No issue. As long as the time between his clicks never exceed 1440 seconds. 

session.save_path = “/var/cpanel/php/sessions/ea-php72”

upload_max_filesize = 512M: It is maximum file upload size

zlib.output_compression = Off : The zlib extension offers the option to transparently compress your pages on-the-fly, if the requesting for browser supports this

session.cookie_httponly = off: Javascript Cookie Protection. If an attacker can manages to inject Javascript code for stealing user’s current cookies – the document.cookie string – the HttpOnly cookie you have set won’t show up in the list.

disable_functions=exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source : disabling dangerous PHP functions. Disable these most vulnerable to attack server functions that are rarely used

base64_decode = Off : turn base64 garbage off. Lots of bad thing hide in encrypted code and Base64 is the garbage of the internet. This will block any Base64 code from even running. Protecting you from a world of hidden virus and back door payloads. As an added bonus, lots of the themes in the WordPress theme gallery chooser are full of encrypted footers with author links, logos and nags to buy something. This will weed out those crap themes because they won’t work at all.

Php Ini Configuration 1 (Standard)

By default, it will not be present. Sometimes that file needs to be created to add the PHP extension values to it. There are disadvantages. Advantages are like if the file is created you can add the PHP extension codes like increasing memory limit, execution time etc which is required by WordPress.

allow_url_fopen = On
allow_url_include = Off
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 90
max_input_time = 90
max_input_vars = 1000
memory_limit = 512M
post_max_size = 516M
session.gc_maxlifetime = 1440
session.save_path = “/var/cpanel/php/sessions/ea-php72”
upload_max_filesize = 512M
zlib.output_compression = Off

Php Ini Configuration 2 (Infected)

This is and infected configuration file of my hdsqrn site. Error Message was no input file specified. It can be solved according to configuration of Php Ini Configuration 1 (Standard)

allow_url_fopen = On
allow_url_include = Off
display_errors = Off
enable_dl = Off
file_uploads = On
max_execution_time = 30000
max_input_time = 60000
max_input_vars = 50000
memory_limit = 8192M
post_max_size = 8192M
session.gc_maxlifetime = 1440
session.save_path = “/var/cpanel/php/sessions/ea-php72”
upload_max_filesize = 4096M
zlib.output_compression = Off

Php Ini Configuration 3 (XAMP Standard)

Default Value : memory_limit = 128M
Expected value : memory_limit = 256M
max_execution_time = 600
max_input_time = 600
memory_limit = 1024M
post_max_size = 1024M
max_allowed_packet = 1024M

How to Protect php.ini File

Paste the following code into the bottom of the file and then click save . As a result your php.ini file will be protected. This change prevents php hackers from finding exploits on your site.

According to bluehost

<Files php.ini>
Order allow,deny
Deny from all
</Files>

According to inmotionhosting

Find your .htaccess file and edit it with a code editor. Place the following code in your .htaccess.

<filesMatch “.(htaccess|htpasswd|ini|phps|fla|psd|log|sh)$”>  Order Allow,Deny  Deny from all </filesMatch>

Problem1: Script timeout passed, if you want to finish import, please resubmit the same file and import will resume.

Problem1 Solution:

If you are importing your database using Phpmyadmin, then there’s a configuration file for it:

\phpmyadmin\libraries\config.default.php
Open this configuration file in any editor and change $cfg[‘ExecTimeLimit’] = 300; to $cfg[‘ExecTimeLimit’] = 0;