Category Archives: Wordpress basics

Adding a widget template in WordPress

By | July 31, 2021

Widget templates in WordPress are particularly coded for showing the widget data on any page by assigning the widget template to that page easily, you can also show more data to that page by using any page builder, or by adding other stuff to that particular widget. You can get all the data and information… Read More »

How to include a php file in WordPress?

By | April 14, 2021

If you are dealing with wordpress coding and wish to include a file in your coding, you can simply give the path to the file and add it in the following manner,   require_once( plugin_dir_path( __FILE__ ) . ‘fileyouwanttoadd.php’ ); Post Views: 300

How to add contact form 7 inside a custom function?

By | March 23, 2021

Here is a rough example for using contact form 7 inside a filter hook. add_filter( ‘wpcf7_validate_tel*’, static function ($result, $tag) { // Conditional logic that used to be in the function $url = home_url(add_query_arg(null, null)); if (!(strpos($url, ‘id’) && strpos($url, ‘form_id’))) { // This is the original callback, now moved here. // Assign the result… Read More »

How to change alternate row color using CSS?

By | September 25, 2020

Hello if you want to change the color of the alternative row like the bootstrap data tables here is code for you <table> <tr class=”records”>          <td>One</td>          <td>one</td> </tr> <tr class=”records”>       <td>Two</td>        <td>two</td> </tr> </table>   Here is css for changing the… Read More »

What is Public html?

By | May 14, 2020

Public_html or website main directory The public_html folder in the Cpanel is the webroot for your main domain name. This denotes that public_html is the folder where you upload all website files which you want to show or execute when someone types your main domain like www.example.com. Index.html file is executed initially and kept in… Read More »

How to Fix Redirect loop on wp admin?

By | May 11, 2020

I was facing the redirection issues ” Redirect loop when trying to login to WordPress admin” after moving a site to the Nginx server. I tried myself from every aspect as per my knowledge and applied a few googled ways also(which I will also enlist below). But unfortunately, No way worked for me. The ways… Read More »