So i found the answer with the help of Pieter Goosen and i would like to share it with you:
A good method will be to create a Shortcode.
To do it, just go to your template Functions.php file and create your function like this example:
function shortcode_hello( $atts ){
$time = ( date('G') < 9 ) ? "good morning" : "good day";
return "Hello, and " . $time . ', my name is Linda';
}
add_shortcode( 'hello', 'shortcode_hello' );
Now all you have to do is to place the [hello]
shortcode on your page builder (Visual composer here).
Related Posts:
- Disable email notification after change of password
- __(): What if I have to pass in a variable?
- How to Loop Plugin Option Field Set?
- Can we completely remove the WordPress Sitemaps (WordPress 5.5)?
- Updating WooCommerce variable product stock issue
- How to Create a Directory in a Plugin Folder?
- Activating a single plugin via php
- Create plugin that works in background
- Checking for user role in a custom plugin
- White text on white background in TinyMCE when wp_editor is called in WP 3.9
- HELP: Integrating WP with raw PHP code once published button is hit
- Loading class files via autoload method
- How to redirect Old Post URL to new Post and keep Old post Comments?
- Modifying Footnote Plugin for Descriptive Title Attributes
- I would like to use create a function in my custom plugin to tell WP to use a different header
- jQuery function didn’t work in my plugin
- bulk change of image setting “link to” to “link to: image url “
- Escape when echoed
- add_meta_box (Will display only in specific page admin WordPress)
- Make id column as AUTO INCREMENT on plugin activation
- Sending email from inside a plugin using PHP PEAR
- Notepad sticky plugin
- WooCommerce Custom Product to checkout
- How to stop or remove an action being called inside a function of an extended class
- Adding an Options Page to a Plugin
- How do I “get the next 10 posts after post_id == x”?
- How to simultaneously access the same MySQL database in the main column and sidebar of WordPress?
- Date calculations from 2 custom fields
- Easiest way to add dropdown to a page
- Changing “elapsed time” to “time remaining” on MP3-jPlayer audio player with CSS or PHP changes
- Adding a new field to the address field type in gravity forms
- Show admin notice on incorrect value on form field
- Customizing NEXTGEN Gallery To link images to pages
- WooCommerce specifc variations for specific user role [closed]
- Nested shortcode functions accessing variable
- Ability to automatically redirect a URL
- Passing Page ID used in Meta Box Creation to JavaScript
- Redirect to another page using contact form 7? [closed]
- Activate my plugins via FTP
- Is wp-app.php or wp-apps.php needed for WordPress?
- How to add apply_filter for a class property in plugin
- Warning: Use of undefined constant list_all – assumed ‘list_all’ (this will throw an Error in a future version of PHP)
- How to distinguish if a plugin is not installed or just not active
- JavaScript in a PHP plugin
- Checking the count within a foreach loop
- Is there a function to list all uploaded images? How can I add one?
- A server-side hook failed when committing plugin code to SVN
- Content-Security-Policy Headers are there and showing the correct settings, but still getting a refused connection
- Need to replace Currency Shortforms
- Api external with wordpress
- How to delete all categories programatically?
- How to use custom Javascript code inside a plugin?
- How to use printf to output two links?
- File Uploader – Upload without adding to Media Library
- Building a plugin into a theme
- 2 wordpress site same database
- How to redirect to a page after the form is submitted
- Trying to include files in plugin isn’t working
- WP Insert Post If user refreshes override new post
- How to makes changes on the shop/category/tag pages but not on the product pages in woocommerce?
- implement custom roles in custom plugin
- How to get current cart values using WC_Shortcodes?
- How to authorize viewing and clicking a function only logged users?
- How can we get this dynamically as this folder may not be by the same name always → wp-admin
- Cant create table on plugin activation
- How to arrange custom posts in the backend/admin by custom taxonomy
- Custom Plugin: How to Include Install Buttons of other 3rd Party Plugins?
- How to ignore fields if empty?
- Why is my shortcode not working?
- Getting Fatal error: Uncaught Error: Call to undefined function plugin_dir_path() when linking to another file within my wordpress plugin
- the content of the uploads folder gets deleted periodically, how to figure out what causes it?
- front end editor creation for Restropress plug in – displaying information from a WP admin area, on a different URL
- implement checkbox or toggle switch in plugin code
- Custom Field used to allow a Free Story; no longer works
- How to send new visitor to a splash page for only one time in wordpress?
- Cron job shedules replace?
- redirect to a custom page
- Can i add custom code in Source in specific page, Header from function.php?
- GET web api method from a WordPress PHP script
- How to change text in a page by utilizing a custom user id?
- Adding link on title its in description but not in title see screenshots attached
- How can I insert a record into a custom table from my custom form in my custom admin page?
- Editing Global Variables from Inside Functions
- How to save information related to post in database?
- Save selectlist value (taxonomy) in wp:wp_set_object_terms
- Page doesn’t load
- Posting code inside the post instead of in the template file using shortcode
- Metabox Data not saving
- Can anyone tell me why I can’t edit a plugin when it is installed without having to re-install?
- Xml output not places where i want
- Including a PHP file via a function that is part of a plugin?
- How to fix ‘Call to undefined function do_settings()’ error?
- How to tweak a plugin without preventing it from updating
- Integrate Razorpay quick payments plugin with contact form7 plugin
- Passing an input variable through a switch statement
- wp_handle_upload – specified file failed upload test
- Warning: Undefined variable $admin
- public custom posts not showing in my wordpress plugin
- I want to allow certain file types on dokan upload files
- How to create different woocommerce single_product.php pages for each product? [closed]