makta112
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Exit pop up with javascriptForum: Developing with WordPress
In reply to: Exit pop up with javascript@joyously Thanks for your response!
@bcworkz Thanks for your reply! Does pop ups have an affect SEO? I think I will go with the modal just to be safe. I found the code below on w3school, and it seems to do exactly what I am looking for. But is it possible to replace the onclick with something similar to the code in my original post. I.e. so instead of having to click on a button for the modal to appear, I want it displayed when the mouse is moved to the top of the screen.
<script> // Get the modal var modal = document.getElementById('myModal'); // Get the button that opens the modal var btn = document.getElementById("myBtn"); // Get the <span> element that closes the modal var span = document.getElementsByClassName("close")[0]; // When the user clicks the button, open the modal btn.onclick = function() { modal.style.display = "block"; } // When the user clicks on <span> (x), close the modal span.onclick = function() { modal.style.display = "none"; } // When the user clicks anywhere outside of the modal, close it window.onclick = function(event) { if (event.target == modal) { modal.style.display = "none"; } } </script>
Forum: Developing with WordPress
In reply to: Display popular posts from last 7 daysI just made a test post and it showed up!
As you point out, the intention was actually to show old and new posts and for the counter to reset every week. But if it’s too much trouble to do that, I will use the code that you’ve already provided.
Thanks again. I really appreciate your help! ??
Mason
Forum: Developing with WordPress
In reply to: Display popular posts from last 7 daysForum: Developing with WordPress
In reply to: Display popular posts from last 7 daysHi @adam3128
I put this inside the loop:
<li> <a href="<?php the_permalink() ?>"> <div id="full-thumb"> <?php if ( has_post_thumbnail() ) { the_post_thumbnail( 'news-thumb' ); } else { ?> <img src="/wp-content/uploads/2017/05/fallback-350x200.jpg" alt="<?php the_title(); ?>" /> <?php } ?> </div> <div id="latest-entry-title"> <?php the_title(); ?> </div> </a> </li>
Thanks ??
Forum: Developing with WordPress
In reply to: Display popular posts from last 7 days^ also I tried removing the post_type part.
Forum: Developing with WordPress
In reply to: Display popular posts from last 7 daysIt doesn’t show up…
Just to be sure.
Do I have to make any changes to what I have in my functions.php?
Or
The counter which I have in single.php?
<?php setPostViews(get_the_ID()); ?>
Finally, the code that you’ve posted goes in the sidebar where I want it to show up, yes?
Thanks!
Forum: Developing with WordPress
In reply to: Display popular posts from last 7 daysIt didn’t work.
Nothing shows up when I add it to the sidebar…Forum: Developing with WordPress
In reply to: Display popular posts from last 7 daysThanks. I will try this ??
Forum: Developing with WordPress
In reply to: Display popular posts from last 7 daysHi Adam
Thanks for your reply.Can you please show me the exact code I need to replace the current one with? I’m not code savvy at all so please do explain things as you would to a beginner.
Thanks again.
Forum: Hacks
In reply to: Display 5 recent posts in single.php?Michael
Thanks! That worked.
But is it ok to display multiple posts in the single.php? Do you think it will mess up something else?
Forum: Hacks
In reply to: Display 5 recent posts in single.php?Yes I am.
Please take a look at the bottom of this page. As you can see the posts display a more link instead of the post in full.Forum: Hacks
In reply to: Display 5 recent posts in single.php?Thanks! That works ??
I want the content of each post to show up below the title. How would I do that? I tried using<?php the_content(); ?>
But it only shows an excerpt. I want for the FULL post to appear. Help please…
Forum: Fixing WordPress
In reply to: Change thumbnaik sizeThanks but I still can’t make it work.
Can you give me the exact lines of code that I need to add and let me know where to add them?
Forum: Themes and Templates
In reply to: Remove Title attributes from imagesTwenty Eleven.