0

On our website, we have a downloadable PDF guide. I know I need to upload a PDF to the media library and copy the media file URL, but under what section would I find the hard-coded area to make the update to reflect the new document?

2
  • That's going to depend on how you implemented this in the first place, which we don't know sorry. Do you have a plugin that set this up? Is it just a link on a page? Is it triggered by filling in a form? etc.
    – Rup
    Commented Nov 22, 2023 at 0:16
  • The easiest thing might be to search all of the files on your site for the filename of the old PDF, or look for it in the database e.g. search all of the rows in wp_posts, wp_options, wp_postmeta. It might also be the ID of the old PDF in the media library, again I'd guess configured in wp_options or wp_postmeta. Or in a post body via a shortcode.
    – Rup
    Commented Nov 22, 2023 at 0:18

1 Answer 1

0

The specific location to update the link to your downloadable PDF guide can vary depending on how your website is built and the theme you're using. However, I can provide you with general guidance on where you might find and update the link:

Page/Post Editor:

If the link to the PDF guide is within the content of a specific page or post, you can go to the WordPress admin dashboard, navigate to "Pages" or "Posts," find the page or post where the link is, and edit the content. Look for the link or button that leads to the PDF, and update the URL there. Widgets or Sidebars:

If the link is within a widget or sidebar, go to "Appearance" > "Widgets" in the WordPress admin dashboard. Look for any text widgets, custom HTML widgets, or widgets related to the area where the link is placed. Update the link URL within the widget settings. Navigation Menus:

If the link is in your website's navigation menu, go to "Appearance" > "Menus" in the WordPress admin dashboard. Look for the menu item that links to the PDF guide and update the URL there. Theme Options or Customizer:

Some themes provide options in the WordPress Customizer or theme settings where you can define URLs for important links. Check for any theme-specific settings related to downloadable documents. Theme Files (Advanced):

If the link is hard-coded into your theme files, you might need to access the theme files directly. This is more advanced and should be done cautiously. Look for files like header.php, footer.php, or custom templates where the link might be coded. Before making any changes, it's a good idea to create a backup of your website or, if possible, make changes on a staging site to ensure that you can easily revert if needed.

If you're unsure about where to find the link or encounter difficulties, consider reaching out to your theme's support (if you're using a premium theme) or the developer who built your website for more specific guidance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.