wordpress

WordPress enable SESSION

Enable session

Add the following code in function.php to enable session in wordpress

 

  Like
By bm on August 30, 2017 | php, wordpress | A comment?

WordPress turn on comments for all posts

Turn on comments for all posts

using wordPress  query()

Using normal sql

Turn off comments for all posts

using wordpress query()

using normal sql

 

ref:

https://codex.wordpress.org/Class_Reference/wpdb

 

  Like
By bm on June 28, 2016 | wordpress | A comment?
Tags: ,

WordPress create advanced custom plugin using OOP

WordPress create advanced custom plugin using OOP

In this example, I am explaining how to add CSS, Java script, ajax in our custom plugin.

Plugin directory structure

plugin advanced folder structure

mysample.php

dashboard_view.php

innerpage_view.php

mystyle.css

myjs.js

dashboard

inner page

 

For  WordPress create simple custom plugin using OOP refer http://wiki.workassis.com/wordpress-create-simple-custom-plugin-using-oop/

refer

https://developer.wordpress.org/reference/functions/wp_register_script/

https://codex.wordpress.org/Function_Reference/wp_register_style

https://codex.wordpress.org/Plugin_API/Action_Reference/wp_ajax_(action)

https://developer.wordpress.org/reference/functions/wp_enqueue_script/

https://developer.wordpress.org/reference/functions/wp_enqueue_style/

https://developer.wordpress.org/reference/functions/get_option/

https://codex.wordpress.org/Function_Reference/add_option

https://codex.wordpress.org/Function_Reference/update_option

 

1 Like
By bm on June 27, 2016 | wordpress | A comment?
Tags: , , , , ,

WordPress create simple custom plugin using OOP

Create simple custom plugin using OOP

Plugin directory structure

custom plugin directory structure

Note:-Plugin folder name and the file name should be same

mysample.php

You can see the commented line in the top of the file. This is plugin specific information header. WordPress recognize our plugin using this

Got admin pane and select plugin menu you can see our plugin there

plugin install

Activate the plugin.

Tadaaaaaaaa…….. see our plugin create a menu and it sub menu 🙂

activ1

activ2

activ3

 

for WordPress create advanced custom plugin using OOP http://wiki.workassis.com/wordpress-create-advanced-custom-plugin-using-oop/

 

  Like
By bm on June 23, 2016 | wordpress | A comment?
Tags: , , , ,

WordPress create custom dashboard widget using meta box

WordPress create custom dashboard widget using meta box

Output

meta box widget

 

Related topics

ref: https://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget

2 Likes

WordPress create custom advanced dashboard widget

WordPress create custom advanced dashboard widget

Add the following code to functions.php

Output

wdget view

wdget edit

wdget final

 

Related topics

ref: https://codex.wordpress.org/Function_Reference/wp_add_dashboard_widget

 

  Like
By bm on June 22, 2016 | wordpress | A comment?
Tags: , , , ,