• I have social media links in the footer of my wordpress template that are pulled from my options database. This is the Instagram one:

    echo get_option($GLOBALS['SHORTNAME'].'_instagram_link','');

    The trouble is I can’t find where these would have been entered into the options table from. The links are not in the links section of my admin and there doesn’t seem to be a widget for this. I did this so long ago I can’t remember how I did it. Is it possible that these could have been added to options via a plugin and if so does anyone know what plugin this might be as I don’t have a plugin installed that currently does this?

    Many thanks.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    Use the phpMyAdmin app (usually accessed through your hosting account) to search the options table for ‘_instagram_link’ option_name using theLIKE %..% wildcard operator. The results will reveal what the value for the SHORTNAME global is. The value is likely a custom prefix of some sort meant to avoid name collisions with other themes or plugins. Such a prefix is often the initials of the associated theme or plugin. For example, options saved by WooCommerce are almost always prefixed with “wc”, Advanced Custom Fields always with “acf”. Hopefully that’ll be enough for you to realize which module is saving the option values.

    If this investigation is so you can alter the links, you could directly alter values via phpMyAdmin instead of using the intended UI in WP. Be very careful if you do so, and backup the table before doing anything. There is no error checking or sanitation in phpMyAdmin and it’s all to easy to make a mess of things. If the value is part of a serialized array instead of plain text, I strongly recommend not attempting to edit serialized arrays unless you’re very familiar with the proper syntax.

    Thread Starter garrettlynch

    (@garrettlynch)

    Hi

    >Use the phpMyAdmin app

    Yes I’ve already done that. I needed to update the url associated with the Instagram entry so just did it manually via phpmyadmin – it’s just a plain text url. Unfortunately the SHORTNAME resolves to the name of my website theme so no clues as to what the admin section or plugin might have been. I was hoping this might sound familiar to someone here – where there might be an alternative link entry section in the WordPress admin. It’s very odd that I didn’t use the default Links section so I think I’ll just flush these entries from the options table and start again with Links modifiying my template to pull them from there.

    Many thanks.

    Moderator bcworkz

    (@bcworkz)

    You must have a fairly old WP site for Links to be a feature. It has been a legacy feature that’s hidden in new installations for many years now. There is a way to enable it again on newer sites if one desires. Most users these days don’t know it’s even a feature.

    Anything you add to Links would be independent of what is saved in options. If you’re unable to update the link where SHORTNAME is involved, I suspect you may have edited your IG link for the Links feature but not the option involving SHORTNAME. If you know that SHORTNAME global resolves to your theme name, then you can determine the exact option name to search for. Let’s say your theme name is “foo”. Then the option name to look for is “foo_instagram_link”

    Thread Starter garrettlynch

    (@garrettlynch)

    >You must have a fairly old WP site for Links to be a feature. It has been a legacy feature that’s hidden in new installations for many years now.

    No, current version: 6.6.1. Perhaps if there are links it remains activated. Anyway, don’t worry about it. I was just hoping that the saving in the options table might ring a bell with someone – they might be able to remember what and how that used to work. If I could trace it back to a plugin I could just reinstall the plug and problem resolved.

    Moderator bcworkz

    (@bcworkz)

    “Old” — no, not by version but by when the DB was initially built. For example, I have a site with links that I started in 2011 but it too runs the current WP version. As you say, not important since it’s possible to reinstate links on newer sites even if they are initially hidden.

    In any case, the links you enter in your admin area are not saved in options, there’s a separate table for that. The option $GLOBALS['SHORTNAME'].'_instagram_link' was entered through some other mechanism than the admin links list table.

    There is a hidden admin page which lists all options, you’ll find the item there where it can be edited. In your browser, manually type in your site’s URL to /wp-admin/options.php. The resulting page is extremely long, you’ll need to use your browser’s search function (Ctrl/Cmd + F in most browsers) to find anything. After making any change, there’s a Save Changes button way at the bottom of the page.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.