how to remove padding from left and right side? [closed]

Use the developer tools in your browser (i.e inspector in Chrome or firebug in Firefox) to see where the padding is coming from. Either the padding is applied to something other than the body, or the padding is applied to the body but is still overriding your CSS. For example: body.class { padding: 20px; } … Read more

When can changing a theme damage a website?

In short yes. The best way to achieve this is by setting up a staging environment. This will have a carbon-copy of the latest version of your WordPress site. From there, you can update the theme and verify that everything works as planned. Once everything checks out, you can apply those changes to your live … Read more

WordPress security issue to output data from user input from theme option form

Security issues arise when you write code that open up possibilities for outsiders to access your database or otherwise compromise your installation. The above code just reads options and content from the database and translates this into static html that will be send to the browser of the page’s visitor. There’s no code (like a … Read more

Do not show excerpt in post content

Don’t use the more tag to manually define excerpts. There’s a separate input field for that. If it’s not visible, go to “screen options” in the upper right corner of the edit screen to enable it. What exactly is shown on your single and archive pages depends on your theme. There is no general way … Read more

Is It wrong to use oop approach on functions.php?

As described in the Child Themes entry in the codex: TIP FOR THEME DEVELOPERS. The fact that a child theme’s functions.php is loaded first means that you can make the user functions of your theme pluggable —that is, replaceable by a child theme— by declaring them conditionally. if ( ! function_exists( ‘theme_special_nav’ ) ) { … Read more

how to change a theme slug

For a theme name Hello World a search and replace should be done in phases. Make sure you do a case sensitive search and replace. Replace Hello World with Example Name Replace hello-world with example-name Replace hello_world with example_name Modify theme folder name Look for any other namespaces that the theme uses and replace accordingly. … Read more

Change title slug or separator in WordPress

To change the title separator, you’ll need to use this filter document_title_separator which was introduced since WordPress 4.4.0. Here’s how you can customize the separator: apply_filters( ‘document_title_separator’, ‘your_custom_separator’ ); function your_custom_separator( $separator ) { $separator=”|”; return $separator; } Hope this helps. Updated Answer add_filter( ‘document_title_separator’, ‘your_custom_separator’ ); function your_custom_separator( $separator ) { $separator=”|”; return $separator; … Read more