I have used Isotope in my new site and the problem I am facing is when I hover the individual item a div which is bigger in size providing additional description should be displayed but it is getting hidden or cut off by the other divs. What I want to achieve is similiar to the www.ted.com site.
This is the html part of my grid which pulls the individual abstract from the database
<div id="container" class="clearfix">
<?php
$sql="SELECT * FROM abstracts where year='2012' AND status='publish' order by date_added desc LIMIT 0, 15";
$sql_query = mysql_query($sql);
while($row=mysql_fetch_assoc($sql_query))
{
?>
<a href="http://www.painlink.org/staging/login.php">
<div class="category <?php echo $specialities;?>" data-symbol="Hg" data-category="basicscience">
<div class="Border">
<img src="cropper.php?src=admin/images/journals/<?php echo $row['journal_image'];?>&h=180&w=120&zc=1">
**<span><div id="filterLink_text"><?php echo $row['title']; ?></div></span>**
</div>
</div></a>
<?php
}
?>
</div>
I have also changed the following in the css so that it is higher than the isotope-item
.isotope-item:hover {
z-index: 10;
}
The bolded span which is hidden has to be displayed upon hovering.
My site url is www.painlink.org/staging
Can you please help me out with this.
Cheers,
Neethi
I've wrote a similar thing and I used the script from the site http://www.maxmedia.com. It's not that easy to accomplish. You can try to dissassmble the javascript from maxmedia. They used compressed javascript so you need a good editor. There is also the problem when you mouse out from a tile and mouse over another tile quickly again and again it seems that the mouse event sometimes didn't work. Then you must register the events in a controller. About the hidden span I don't see a problem here but I think you need to solve it using animate. You must unhide the span and scroll the image and the span simultanously so that the span is fully visible and the image is hidden when you don't want to grow the tile.
Related
I have been struggling with this problem for the last two weeks now, and the problem is that I am not able to display the ajax load more (and any of its post and even the button) on my custom archive page. I want to provide a sleek archive for my visitors, allowing them to just scroll in previous posts without having to use any pagination. And the strange thing is, when I echo the shortcode for the ajax load more, it doesn't display at all. When I inspect the code, it has been automatically set to visibility:hidden. What really seems to be the problem here?
How can I display this in my "page-arkiv.php"?
Plugin used: https://wordpress.org/plugins/ajax-load-more/
Code:
<h1>TEST PAGE </h1>
<?php echo do_shortcode('[ajax_load_more]'); ?>
Output:
<div id="ajax-load-more" class="ajax-load-more-wrap default" data-alm-id="" data-canonical-url="http://whatever.com/arkiv/" data-slug="arkiv" data-post-id="73">
<div class="alm-listing alm-ajax" data-repeater="default" data-post-type="post" data-order="DESC" data-orderby="date" data-offset="0" data-posts-per-page="5" data-scroll="true" data-scroll-distance="100" data-max-pages="0" data-pause-override="false" data-pause="false" data-button-label="Older Posts" data-transition="fade" data-images-loaded="false">
</div>
<div class="alm-btn-wrap" style="visibility: hidden;"><button class="alm-load-more-btn more " rel="next">Older Posts</button></div></div>
And this is my Reading settings:
I'm new to Wordpress and PHP and this might be a dumb question, but I'm trying to link one of my menu items to one of the sections on my index page.
I know that if I just wanted to link it to the index I should use this:
<?php echo home_url(); ?>
But I want the link to send the user to the "About" section. Basically, I need to know how to do this:
index.php#about
but with PHP.
Thank you!
You're on the right track.
The ideal way to do this would be to add a <a name="about></a> tag to the appropriate section of your template. This is called an HTML anchor and is how those #tags know where to point to.
Given that this is Wordpress, you could probably also get away with just appending that to the title of the appropriate section. So wherever you specified 'call this section "About"', you could probably redo it as 'call this section "<a name="about">About</a>"' and then you'll be able to link to it using anchors like in your example-- About
If you are new to php, maybe you should use wordpress's editor ?
In your page (in the admin page), you can put any html you want.
In the editor, you can add custom links (with anchors or not) and you can put a div tag in the "html" tab.
So if you put your link at the top of your page and put your section in a div id="myanchor", it should do it !
You shouldn't do this with HTML or PHP but rather with JS. Specifically for long pages and require in-page navigation, I really like the scrollTo jQuery plugin.
In practice, you'll have some HTML containers that look something like this:
<!-- Your menu -->
<ul>
<li id="about-button"></li>
<li id="product-button"></li>
<li id="something-button"></li>
<li id="else-button"></li>
</ul>
<!--Your page sections-->
<main class="my-page">
<section id="about"></section>
<section id="product"></section>
<section id="something"></section>
<section id="else"></section>
</main>
Once you've included jQuery and the scrollTo plugin, you'll have some JS that looks like this:
$('#about-button').click(function() {
$.scrollTo($('#about'), {
duration: 800,
offset: -50
});
return false;
});
The JS is saying that once you click on the #about-button, take 800 milliseconds and animate the page down to -50px before the position of the #about HTML element. You could just setup a series of click functions for each button and you'd have a slick in-page nav system.
My friend has asked me to help them move images around on their wordpress site. They have an image slideshow that runs along the bottom of the page and the image gallery that shows, depends on the page template used.
One template has the following code:
<?php
$tagu = get_post_meta($post->ID,'bototm_gallery');
?>
<div class="flt box_bottom">
<ul style="margin-left:10px !important; width:100% !important;" class="sub_photo sub_photo_gigs" class="sub_photo">
<?php echo do_shortcode($tagu['0']); ?>
</ul>`
and another page template shows this code:
<?php $tagu = get_post_meta($post->ID,'bototm_gallery'); ?>
<div class="flt box_bottom">
<div class="sv_footer_photo">
<?php echo do_shortcode($tagu['0']); ?>
</div>`
How do I add images to a specific gallery? I can't find a gallery id in the media library and/or I don't know where to find the class such as sv_footer_photo or sub_photo.
Could you please explain it to me?
Oh Wow, I've found it and sure enough it was simple.
I had to click on 'Screen Options' at the top of the page, tick the box for custom fields and then I can see the gallery image ids assigned to that page.
So I've been trying desperately to get my page title to overlay in the center of the header image, both horizontally and vertically, on my portfolio pages (here's a page with a longer title). I finally found a way to get the h1 title where I want it, but now I want to make it larger. However, when I currently resize the window to certain widths, the title doesn't wrap, it just disappears when it gets to long for the window. Would you mind taking a look and see if there would be a fix for this? I'm thinking that I'm using the wrong display tag somewhere along the line, but I'm not the best coder.
Here is the php for the header image and title (you can ignore the title that is black as I will get rid of that once I figure this one out). I think you should be able to see the rest of the html and css, but if I can provide anything else that may help with figuring this out, please let me know what that might be.
<?php get_header(); ?>
<div id="middle" class="clearfix">
<?php // Get the header image
$hi = getHeaderImage();
if($hi) :
?>
<div id="pageHeadImage" class="" >
<div class="inside" style="<?php echo 'background-image: url('.$hi.');' ?>">
<div id="projectTitleDiv">
<span class="aligner"></span>
<h1 class="projectTitle"><?php the_title(); ?></h1>
</div>
</div>
</div>
<?php endif;?>
Your div.aligner is causing the issue - it pushes the h1 out of the div. Remove div.aligner and use the following CSS to vertically centre #projectTitleDiv:
#projectTitleDiv {
position:relative;
top:50%;
transform:translateY(-50%);
}
I am using the jQueryUI dialog modal like this:
<div id="dialog-modal" title="Basic modal dialog">
<img src="#" alt="Pictures" />
</div>
I have a PHP foreach loop that displays three image icons at any given moment. The image urls are in a MySQL database. The images themselves are contained inside anchor tags, and shown as a thumbnail. The <a> contains a class called "theLink". jQuery knows to open up the dialog when you click on "theLink" (in essence, clicking on the pic).
My hope is to allow the image to be shown much larger than a thumbnail by clicking on it. And then it will dynamically transfer the image link to the modal dialog where it will be shown. So again, one modal dialog div (as seen above) just under the <body> tag. This is what I am looking for:
When you click on "theLink" it will take the PHP generated image link from the img and use it to replace the "#" in the modal div.
<a> <img src="PHP GENERATED" /> </a>
I figured out the answer by getting jQuery basics down.
I had to create a class called ImageLink in the image that is php generated. I had to use a class, not an ID because this class would be repeated three times as I have three thumbnails displayed at a time.
Keyword 'this' was important so I can point to the specific imageLink class.
<a><img src="PHP GENERATED" class="imageLink" /></a>
Then, in jQuery:
var realImage = $(this).find('.imageLink').attr("src");
$('#popUpImage').attr('src', realImage);
$('#dialog-modal').dialog('open');