by default we have drupal search box,
i want to add one dropdown , that should contain the content types(like page,story,article)
i know there is a lot of modules, but i want to know, using hook module, i want to add the
dropdown,
i want to do it with only hook methodm
Try providing a preprocess for the search form function in your theme's template.php file.
There's a nice example of it here.
Related
Hello i need to create a dropdown that changes an entire section of content, anyone know of a elementor plugin that is capable of this?
i tried using Advanced custom fields to create a select box but not sure how to configure this...
I'm very new to WordPress (tbh, it's my first time working with it). And I need to make a website as my school project using CMS. Creating pages with templates is alright, but I have a lot of troubles with buttons. I found this website, and I can see it using WordPress. I need such buttons as on this page https://movie-chooser.co.ua/random-movie-2/ (they appear when you hover over the image). Is this a default option for buttons in WordPress? If not, is there a plugin for this or what is the way to add them on my images?
First Install Elementor plugin https://wordpress.org/plugins/elementor/
and go to page when you add button and open page with elementor
and do drag and drop any element like button, space, text editor etc.
You have several ways to achieve that:
Overwritting Wordpress CSS
Using a plugin
Create your own shortcode
1 - Overwriting Wordpress CSS
If you manage to display all the elements using wordpress template, and your only issue is to display buttons over the images, then it should only be a matter of CSS
2 - Using a plugin
The idea here is to find a plugin that help you to create/display the informations you need (maybe you'll need to add functionnality to basic post though custom fields or using a custom post type).
Once you find the right plugin, again if the plugin dosen't directly offert some settings on the design then you'll have to overwrite the plugin's CSS rules to display the elements as you want.
3 - Create your own shortcode
If you're new to Wordpress I wouldn't recommend this method as it is kind of advanced, unless you're comfortable with PHP/HTML/CSS (optionaly JS).
This is the more flexible solution as you can basically control anything, but it will require you to understand some core concepts of Wordpress like WP Query and how custom queries works.
The idea here is to create a shortcode.
THis shortcode refere to a custom made PHP function, in which you can create a custom request to fetch the informations you need to display from Wordpress database, and display it in an HTML structure that you decide.
THen angain, you'll just have to customize it though CSS.
Note : no need to create a whole plugin if you decide to create a shortcode, you can use the template functions.php file for that.
I've been trying to go through the codex on creating a custom plugin, i managed to get as far as adding it to the admin panel but i am a little stuck on how to add custom fields to it. for example if i wanted to make a menu plugin, and add items, in the backend i would want to add each item that would be in the menu.
It would need an image, title, description, price. How would i add these fields?
If someone can help me out or even point me to the right reference material or tutorial that would be amazing.
i uploaded the files i did here for reference: https://www.dropbox.com/s/dn31o8nxfd62bo0/menu-plugin.zip?dl=0
Thanks.
This is probably a good place to start: https://codex.wordpress.org/Writing_a_Plugin
But also, Advanced Custom Fields may provide you with additional features that you could use: http://www.advancedcustomfields.com/
I am a newbie in wordpress and I was given the opportunity to edit a certain plugin which is MarketPress, but then I had hard times dealing with it since I'm new to this thing and I don't know where exactly to go, I would want to edit an included dynamic_sidebar but I can't the file on where to edit this. Please help me. :(
Thanks.
Not sure of your level of understanding so forgive me if this is over-simplistic.
The sidebar content is driven by widgets, which is controlled from the Widgets admin panel. The only thing about a sidebar that you should be able to edit by messing with its definition are the wrapping markup for the whole widget and for the title, along with the sidebars name and description. The last two only effect text that shows up in the admin Widgets panel.
However what I describe above is not found with the dynamic_sidebar() method, rather with the register_sidebar() or register_sidebars() methods. These 'define' the name and settings for a sidebar. The dynamic_sidebar() method is the used to implement the sidebar by passing it that sidebars name.
The sidebar is then populated with widgets via the admin Widgets panel.
Typically sidebars are registered from within the functions.php file of a theme, but if a plugin contains templates there no reason why it couldn't also have its own sidebars. As for where the register_sidebar() function is being used in your plugin specifically, I couldn't say. Just search through it using whatever IDE you like, or grep if your comfortable with it.
Hope this helps.
I am using asp.net, i have added tinyMCE editor to my page.
I want to add a custom plugin to TinyEditor that display a drop down list with some variable.
And on selecting a variable from variable list that can be added to cursor place in text area.
How can i achive this or make a custom plugin of this type to be added in my TinyMCE.
For that drop down list on that plugin i want to use Jeditable, that display a drop down list.
Here is a moxiecode tutorial on how to write an own tinymce plugin.
The only problem i see is that you cannot use your own mechanism to display a drop down list.
I think you might have to stick witch the regular tinymce drop-down mechanism.