Support » Plugin: Media Credit » Can I change the default Attached Page

  • Resolved jimario

    (@jimario)


    I am enjoying this plugin. I am using template code to display all photos of a particular author on the author.php page. This works perfectly. When you click a photo, it goes to a page entitled “News” which happens to be a page I created amongst many others. I didn’t configure anything to go to this page and I’d like to

    A) change the page that displays the attached pic

    OR

    B) change the title of the page if this is a page created
    by Media-Credit

    Please help. thanks.

    https://wordpress.org/plugins/media-credit/

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author pepe

    (@pputzer)

    Media Credit does not create any pages, so it must be your code. However, unless you show us the actual PHP code involved, there is no way to debug the situation.

    Thread Starter jimario

    (@jimario)

    I am using Enfold theme but I have no idea which file will control how WordPress dictates which page will be used as the default page. Is it possible to configure Media-Credit plugin to just link to the actual image rather than the image’s attached page? That would be best because I could then use a lightbox plugin to display the full size image.

    Plugin Author pepe

    (@pputzer)

    Media Credit dosesn’t link the photo to any page. Whether an image links to its attachment page or the file is controlled by the standard WP mechanisms (i.e. what option you select when you insert the image).

    Thread Starter jimario

    (@jimario)

    Ok. photos are being uploaded in the backend profile editor. When a user uploads, there is no option to select whether it links to a file, page/post, or none.

    Plugin Author pepe

    (@pputzer)

    What exactly are we talking about? Links of images inserted into a post or the display_author_media($author_id, ...); function described in the FAQ? If the latter, please post your PHP code.

    For inserted images, you control the link target via the “Link To” property in the standard WP media dialog (under the heading “Attachment Display Settings”).

    Thread Starter jimario

    (@jimario)

    I am using Advanced Custom Fields to add fields to the profile editor. The fields that I’ve added are Image fields so that the user can upload several images. Those images are then displayed on the author.php page using your plugin.

    When a user selects an image to upload, the “Link To” drop down menu isn’t displaying. It displays when you’re adding media to an actual post or a page but not on the author page. I found some code to add to my functions.php file that will force uploaded media to attach to file rather than a page

    function mytheme_setup() {
    	// Set default values for the upload media box
    	update_option('image_default_link_type', 'file' );
    
    }
    add_action('after_setup_theme', 'mytheme_setup');

    And I’ve also checked options-schema.php in wp-admin/includes/ and found that image_default_link_type was already configured for “file”. Yet uploading photos in the profile editor still links to a page.

    Plugin Author pepe

    (@pputzer)

    What’s the code in author.php? This looks an awful lot like a bug in either the Advanced Custom Fields plugin or your actual template code, not in Media Credit.

    Plugin Author pepe

    (@pputzer)

    Did you get things resolved?

    Plugin Author pepe

    (@pputzer)

    Since you didn’t reply anymore, I assume you got things resolved, @jimario?

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can I change the default Attached Page’ is closed to new replies.