Opening Wordpress Gallery from a link - wordpress

Is it possible to open a wordpress gallery using an anchor tag so that the gallery appears on the same page in a lightbox? I cannot figure out how to do so. It seems like it should be such a simple thing to do but I have tried various plug ins and cannot work out a simple solution.

first, install this plugin
https://wordpress.org/plugins/anything-popup/
Then go to setting->anthing-pop there will be a shortcode http://awesomescreenshot.com/03561dd759
then click to edit it and put the [galley] shortcode
http://awesomescreenshot.com/09261ddfc0
http://awesomescreenshot.com/0ae61ddmb5
Now use the shortcode on click see screenshot
http://awesomescreenshot.com/0de61dej39
you can use the shortcode into post or page or in file like this
<?php echo do_shortcode('[AnythingPopup id="1"]'); ?>
thanks

Related

Wordpress excerpt not working?

I am using wordpress eduma Learn press plugin. The courses page excerpt box is there but text is not displaying. can you please help me? Other pages meta tags is displayed
Add below code in your theme
add_post_type_support('page', 'excerpt');
So is the problem that when viewing the page, the whole content is shown instead of just an excerpt?
If so, try to find the appropriate theme file and if it uses:
the_content();
replace it with:
the_excerpt();

The URL added while adding featured image in wordpress

I am working with wordpress latest version.
As in wordrpess, we can add URL while adding a featured image in a post as there are text fields like caption, title, alt text, description, URL etc.
I've added a link like http://example.com/abc-news
I am fine to show the featured image in the blog post but I want that link as
{featured-image}
So that, if anyone clicks on the featured image he/she will go to that link.
Any help would be appreciated.
If you are using the default theme with the latest version of WordPress, you can edit content.php in the 2014 theme directory.
You need to wrap <?php twentyfourteen_post_thumbnail(); ?> with the link code pointing to your URL.
This code should be around line 13 in content.php.
<?php twentyfourteen_post_thumbnail(); ?>
To link to the current blog post, you could add this code:
<?php twentyfourteen_post_thumbnail(); ?>
If you are using a different theme than the default, open the file which contains The Loop in your theme, search for the_post_thumbnail or a similarly named function, and change the code as above.
The exact answer will vary depending on theme, but 98% of the time the fix should be similar to the above. Hope this helps.
Edit: Here's some more information: http://codex.wordpress.org/Function_Reference/the_post_thumbnail#Post_Thumbnail_Linking_to_the_Post_Permalink
Thanks for your prompt reply.
You are right that it's 98% depending on the theme.
The theme is using a meta_value to add a custom URL for the featured image.
So, I need to get that URL through get_post_meta
I've got from here.
And I am fine with it now. :-)
Thanks

shortcode in model page in twentytwelve theme?

I create a page in the model twentytwelve theme and I install the plugin cool video galery. my problem if I create it shows me the shortcode, not the video, how do I correct the problem?
Have you try to use do_shortcode function for using shortcode in Template.
So, Suppose if you short code is [cvg-gallery galleryId='gallery-id'] then wrap it with do_shotcode. Like
// Use shortcode in a PHP file (outside the post editor).
echo do_shortcode('[cvg-gallery galleryId='gallery-id']');
And then use it in template or in Lightbox.

Archive Page in Wordpress?

I want to know how to make an archive page like instantshift has made.. link below..
http://www.instantshift.com/archive/
I have made everything but don't know the query to specify the orderly archives listing
I use Viper Bond's Clean Archives for a similar effect: http://www.viper007bond.com/wordpress-plugins/clean-archives-reloaded. I like that the jQuery effect only shows when you activate the plugin in a page.
You could also use <?php wp_get_archives( $args ); ?> as found here: http://codex.wordpress.org/Function_Reference/wp_get_archives
Don't forget to not leave wordpress.stackexchange.com lonely too!

widgets_on_pages not working

Hello i'm using widgets_on_pages to place widgets on pages, i installed it and added a widget to the panel in my admin section, then i added [widgets_on_pages id=2] ("its the 2nd sidebar and it said i should add this") into my html on the place where the widget should appear but it only shows the code i added in pure text, nothing else happens, anyone know what i'm doing wrong?
If I understand correctly then the following applies... if not, apologies.
You should not need to do it this way. It seems that Vincent, you are trying to add the shortcode into a theme php file... this is incorrect and the shortcode is for adding into the page/post content by the post/page editor.
To add a Widgets on Pages sidebar to a template then v 0.0.7 (I believe) has built in template tags (see link text). This should allow you to add the following I think
<?php widgets_on_template("2"); ?>
Try this
<?php echo do_shortcode('[widgets_on_pages id=2]'] ?>

Resources