Looks like it’s possible to use a placeholder tag, the following is the PHP code using a _custom_link
value of http://somelink.com/?ref=%%title%%
.
<?php
// must be within the Loop
$ref_slug = strtoupper(sanitize_title_with_dashes(get_the_title()));
$regex = '(\%\%title\%\%)';
$ref_link = ( get_option('_custom_link') ) ? preg_replace( $regex, $ref_slug, get_option('_custom_link')) : null;
echo $ref_link;
?>
Related Posts:
- Is it safe to store a user setting you don’t want the user to ever modify as a user option?
- What is the advantage of the wp_options design pattern?
- Making a configurable field translatable
- How to save values of a custom input field on the Network > Site Info screen
- get_post_meta fields don’t show up on posts page
- Set front page option using custom fields?
- Get Data From wp_sitemeta for Multisite network
- meta fields for the whole wordpress site
- Where does this field get its value?
- Warn user that data may be lost for custom pages
- Custom Theme Fields in Settings Menu – apply filters to one of those fields?
- Show echo ready in single.php
- WP_Query – Order results by meta value
- Custom query with orderby meta_value of custom field
- How to enable revisions for post meta data?
- Any way to add custom options to Gallery Settings?
- Including custom fields in search?
- How to display all custom fields associated with a post?
- How to position a custom field before the editor
- passing argument to get_template_part() or a better way to code
- ACF – get_field() using ‘option’ as post_id not working
- Display thumbnail from custom field
- Bulk move (or copy) from a custom field to the post content?
- Populating meta box with select-list of existing posts, and assigning it to custom post types
- Getting Custom Field data from a page hierarchy
- limit amount of photos uploaded per cpt post
- Problem with adding exta field in metabox in custom post type
- Move value of one custom field to another
- How do I add custom_meta_box_id’s value?
- little help with a mySQL query to wp database
- Add WYSIWYG to Image Description field
- How do I query for a post by custom field?
- Including Database Generated Pages in Site Search [closed]
- Calling custom profile fields?
- How to save media files under custom folder without changing wp-config.php or changing media settings
- Performance of storing multiple meta fields vs one JSON encoded field [duplicate]
- get_posts that match a user-specified value on a page
- WP_User_Query pulling ACF to loop
- how to put a custom field value in variable
- Custom Metabox Not Saving
- How to add image attachment to post from a single meta key (Woocommerce)
- How to add Advenced Custom Fields In Single Post
- How can I output a list of values for a custom field, and posts with those values?
- Manipulate javascript code from custom made admin page menu
- Add additional ‘description’ field for defined roles / role metadata?
- Change the main loop WordPress impact on the server?
- How to get categories with posts by custom field value?
- Meta Query returns wrong number of posts
- Custom field as Slug
- How to save the date/time of last update of an extra user profile field?
- How to populate custom field dropdown box based on prior selection?
- Saving Custom Field Data before Publish
- Custom wysiwyg editor doesn’t execute shortcodes?
- How to hide a div based on contents of custom field
- Hook after meta created
- Get all the posts where meta field with multiple choice has several values checked
- Inserting data into MagicFields using mysql queries
- Custom Field box history
- Check & remove special characters in a field?
- Google map that plot’s several markers – each one with custom data
- Update post meta custom field using block editor
- If I update WordPress my custom data will be deleted from the wp_users table?
- Get emails from users by custom field SQL
- Why am I getting a “Call to member function format() on a non-object” error?
- How To Show Get Adjacent Posts If Posts Are Sorted By Custom Field
- How to calculate custom field value (average)
- Modify custom field from front end
- How to get all custom fields with some prefix in key?
- Custom Query Fields – Altering Meta Value
- How to Convert Custom Fields from Text to Array?
- Adding re-type email and check it if the email match
- Use update_post_meta to older posts
- update_post_meta
- update_post_meta not working well
- Exclude URL’s from sanitize_html_classes
- Best way to insert a list of links into a post outside of the_content
- How to add a post’s view count into the WordPress API response
- WP meta_query args not working in function
- Line break description wordpress
- Update custom field on the fly
- Custom field disappeared from screen options
- automatically add custom fields to post title
- Custom Fields Permalink Plugin not observing hyphens
- will wp_insert_post write a new custom field to the database?
- Contact Form 7 List Building
- How to repeate custom field group with bulk image field
- ACF – Compare user and post data
- Advanced Custom Fields deleting some code and adding code for a slider
- How to format the various types of custom fields?
- Extra text’n’image field in a page
- Get first URL from custom field, download and set as featured image on post publish
- Query postmeta values, and return multiple post_titles for common meta value
- How to add an option to admin to add image that could be used as header?
- How to query posts that have certain post meta keys, and sort by meta key and/or value
- sort a custom field base on the date or anything
- Add image custom attribute [closed]
- Retrieving custom field as shortcode
- Foreach giving one too many list items, how can I remove the last empty line?
- I used a custom field for header image and can’t get it to show up on posts
- Archive for custom fields?