WordPress.org

Ready to get started?Download WordPress

Forums

NextGEN Custom Fields
[resolved] Bold Heading and adding a URL link (9 posts)

  1. samadilyas
    Member
    Posted 1 year ago #

    Good plugin and i guess this is exactly what I need to do what I want.
    Thanks to the author.

    I am new to WP so I am clearly having some basic issues.

    I managed to display the Heading on top of the image and price underneath but I am having problems:

    1. I would like to change the Font Size/ Color and make them bold.
    2. Add another field display it under as a small image say "Buy Me" and add a URL to it.

    Can you anyone give me an idea how I can go about it.

    Thanks in advance :)

    http://wordpress.org/extend/plugins/nextgen-gallery-custom-fields/

  2. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Hi samadilyas

    If you have custom fields working already, all you need to do is add another, and wrap it in an anchor tag.
    eg:

    <a href="<?php echo $image->ngg_custom_fields["Your Link URL Field"]; ?>"><?php echo $image->ngg_custom_fields["Your Link Text Field"]; ?></a>

    You can add markup around it to style with CSS, or just wrap it in <strong> tags, to make it bold for example.

    I hope that helps.

  3. Morgan
    Member
    Posted 1 year ago #

    Hi shauno,
    thanks for writing this plugin.

    I used it with NextGen Gallery and would like to add a custom link to images that are showing in a slideshow so that when you click the image, you are taken to the link.

    I already added a field called 'custom-link', but am not sure how to pull it in to my theme.

    I am also using NextGen Galleryview.

    Here is the website: http://www.gogarty.ie

    How can I go about this?

    thanks a bunch!

  4. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Morgan

    Adding custom fields to the JS slideshow is very difficult. The slideshow generates all it's own markup with javascript, so it would mean changing a few of the core NGG included files. This means even if you could make the change, the next time you updated NGG, your changes would get lost.
    Sorry I can't help more with this :(

  5. Morgan
    Member
    Posted 1 year ago #

    wow, thanks for the speedy response!

    I'm looking at this right now to see if I can solve the problem: http://wordpress.org/support/topic/plugin-jj-nextgen-jquery-carousel-adding-image-link-to-thumbnails

    I'll report back if I get it working!

  6. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    I haven't seen JJ NExtGEN jQuery Carousel plugin yet, but if it wraps images in <a> tags, then it should be simple to change.
    I will try make some time to download it and test, and let you know what I find.

  7. shauno
    Member
    Plugin Author

    Posted 1 year ago #

    So I downloaded the JJ Carousel, and you can easily add custom fields as links to the slideshow. You do need to edit one of the plugin's files, so if it updates, your change will be lost (although I see the plugin hasn't been updated in years, so you should be good).

    You said you custom field was called 'custom-link', so simply change line 210 of /wp-content/plugins/jj-nextgen-jquery-carousel/includes/jj_ngg_jquery_carousel.php to this:

    $output .= "<a href='".nggcf_get_field($image->pid, 'custom-link')."'>";
    $output .= "<img src=\"" . $image->imageURL . "\" " . $image_description . $width_d . $height_d . " border=\"0\" />";
    $output .= "</a>";

    That should do it for you.

  8. Morgan
    Member
    Posted 12 months ago #

    Hey thanks for looking shauno. Unfortunately, that did not work:(

    Also, when I went in to fix the code (in my updated version of the plugin) I had to find a file called: jj_ngg_jquery_cycle *not* jj_ngg_jquery_carousel

    Also, the line in question was found at line 169

    I might try another plugin at this point:/

    Thanks for your help though! I'll post back when I find a good work around.

  9. shauno
    Member
    Plugin Author

    Posted 12 months ago #

    Then you aren't using the JJ NextGEN jQuery Carousel plugin, because the file I edited definitely is named as I said, and the change definitely works.
    Good luck finding another plugin and solution.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic