Changeset 2211656
- Timestamp:
- 12/13/2019 03:06:54 PM (6 years ago)
- Location:
- the-insertr/trunk
- Files:
-
- 2 added
- 2 edited
-
readme.txt (modified) (2 diffs)
-
templates (added)
-
templates/settings.php (added)
-
the-insertr.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
the-insertr/trunk/readme.txt
r2210901 r2211656 16 16 This tool helps with PPC and can make landing pages appear more specified and tailored to the ads. 17 17 18 The Herdl dynamic keyword insertion plugin, The Insertr, dynamically inserts a keyword onto your page using a simple URL query string to determine the keyword and a shortcode for placement.19 20 The placement of the word or phrase is determined by the location of the short code. In the case where a word is not specified a fallback Keyword or phrase is placed instead.21 22 Short code to be used: [insertr key="{desiredword}" fallback="{fallback}"] where 'desiredword' is the word to be placed, and 'fallback' is the word to appear if no keyword is specified.23 24 For the Keyword to be placed on your page, you must also add the following parameter to your URL: ?keyword={example} Where 'example' is the word you want to placed.25 26 If your URL already has parameters (E.g - there is already a ? in the URL) add &keyword={keyword} to the end of the string.27 28 Use Cases29 - Improving the landing page experience for Google Ads performance by improving keyword relevancy30 - Personalisation of pages31 - Marketing automation32 33 18 == Installation == 34 19 … … 36 21 37 22 Once this plugin has been approved on the WordPress marketplace we will update the repository with a link. 23 24 == Usage == 25 26 To use this plugin you'll need to implement short codes in your WordPress editor like so: 27 ``` 28 The [insertr key="keyword" fallback="person"] went for a run. 29 ``` 30 31 Then you can use a link to this page as 32 ``` 33 herdl.com/run/?keyword=Cheetah 34 ``` 38 35 39 36 == Frequently Asked Questions == -
the-insertr/trunk/the-insertr.php
r2210952 r2211656 14 14 } 15 15 16 /** 17 * If ACF is enabled add a listener to allow short codes 18 */ 19 if (!class_exists('ACF')) { 16 function theinsertr_register_settings() { 17 add_submenu_page('options-general.php', 'TheInsertr', 'TheInsertr', 'manage_options', 'theinsertr', 'theinsertr_settings'); 18 } 19 20 function theinsertr_settings() { 21 $user = wp_get_current_user(); 22 23 if (!current_user_can('administrator')) { 24 echo '<p>You are not allowed to access this page.</p>'; 25 return; 26 } 27 28 if (isset($_REQUEST['submit'])) { 29 if (!isset($_REQUEST['theinsertr_nonce'])) { 30 $errorMessage = 'nonce field is missing. Settings NOT saved.'; 31 } elseif (!wp_verify_nonce($_REQUEST['theinsertr_nonce'], 'theinsertr')) { 32 $errorMessage = 'Invalid nonce specified. Settings NOT saved.'; 33 } else { 34 update_option('theinsertr_acf_enable', isset($_REQUEST['theinsertr_acf_enable']) ? 'yes' : 'no'); 35 update_option('theinsertr_yoast_title_enable', isset($_REQUEST['theinsertr_yoast_title_enable']) ? 'yes' : 'no'); 36 37 $message = 'Settings Saved.'; 38 } 39 } 40 41 include_once(__DIR__ . '/templates/settings.php'); 42 } 43 44 if (get_option('theinsertr_acf_enable') === 'yes') { 20 45 add_filter('acf/format_value', 'my_acf_format_value'); 21 46 … … 29 54 } 30 55 31 /** 32 * If Yoast SEO is enabled make sure we can use short codes 33 */ 34 if (is_plugin_active('wordpress-seo/wp-seo.php') || is_plugin_active('wordpress-seo-premium/wp-seo-premium.php')) { 56 if (get_option('theinsertr_yoast_title_enable') === 'yes') { 35 57 add_filter('wpseo_title', 'my_wpseo_title'); 36 58 … … 58 80 } 59 81 82 add_action('admin_menu', 'theinsertr_register_settings'); 83 add_action('wp_footer', 'theinsertr_render_script'); 60 84 add_shortcode('insertr', 'insertr_function');
Note: See TracChangeset
for help on using the changeset viewer.