one post into an iframe in wordpress - wordpress

in wordpress how can I load an one post into lightbox iframe, like www.wookmark.com, when click on details and opening the lightbox with post and related posts. I did so, in lndex.php I set the loop <?php the_content();?> then in that loop I write the second <?php the_content();?> which made dabsolute and display none, then with javascript I am callling the div with second <?php the_content();?> and appears the post...but I want the post as in single.php, I mean that navigation links in it open the next post in iframe and not in main page, I have also tried to call iframe putting in it in that case the whole single.php loaded in iframe, with header, footer and navigatin menu, but I just want only the content, how can I relazie that,?

I didn't understand your question, but if you want your posts to display in home page like in www.wookmark.com you can use
query post

Related

Archive displayed on a custom page to be used in menu structure

I would like to direct users to appropriate archive pages from within the menu. If I want this I need a page that I can attach to the menu.
How would I display the exact same stuff as on the archive page (archive.php) on another page so that pagination and functionalities remain the same, but some stuff will be taken from the actual page ? (can create custom page template of course)
I'll still have to show a sidebar for the page that you visited and not archive's sidebar
Breadcrumbs path will still have to show current menu item position and not archive page path
To show sidebar from the actual page is of most importance here.
EDIT
What I want to achieve is this actually:
Lets say I have a page
http://my.page/subpage/something/notifications/
I want that on this page, I can display exactly the same stuff as on the certain archive page which is here:
http://my.page/subpage/notification/
('notification' is a custom post type here)
I already have a solution that displays all archive stuff on another page (created a page template for that), but its a bit complicated to display title, breadcrumbs and sidebar properly for each page, since some of these should stay the same as they would be, but some should take the value of another site.
You can create a custom page template and assign it to a page. On that page you can use get_posts() to query the posts you want, like this:
global $post;
$posts = query_posts( /* Your args here*/ );
foreach($posts as $post) {
setup_postdata($post);
// Do your stuff as in archive.php
}
wp_reset_postdata();

Wordpress show post without widgets, header, footer

We use Wordpress for the company blog. We would like to show some of the posts in a popover (or light box) on another website. To do that, we need to be able to show just the post's contents without the widgets, header, footer, etc.
So, for example, look at this post:
http://wordpress.org/news/2014/07/wordpress-4-0-beta-1/
Imagine being able to use a special URL, like http://wordpress.org/news/2014/07/wordpress-4-0-beta-1/?postOnly=true where the top header would be removed (the black stuff), all the widgets on the side bar, the entire footer, etc.
Only thing remaining would be the headline, when posted and by who, and the actual post contents.
Any ideas?
Create a very simple page template with code similar to this:
<?php
/*
Template Name: Clean Page Template
*/
wp_head();
if (have_posts()) :
while (have_posts()) : the_post();
the_content();
endwhile;
endif;
wp_footer();
Then just set this template in the post edit screen.
If You can modify theme You're using it's simple to do - just check if postOnly parameter is set and set to true in places that render header, footer etc. If so, simply don't render it.

How to differentiate Front page and other pages in Wordpress?

I have created a front page (i.e index.php) with my own design. This page will contain
header got from <?php get_header(); ?> [has navigation bar code]
Then some content. Here I'm showing three thumbnails of posts. [has slider, thumbnail posts etc]
And a footer from <?php get_footer(); ?>[has footer links]
The problem is, I see index.php loaded correctly as a front page. But when I navigate to other pages like About or Contact, the respective content from these pages is not showing up. Instead what getting loaded there is, same what Index page has. I don't want slider or thumbnail appearing on these pages.
So how to tell wp that, this is my front page, and this is my About page, don't load a slider and stuff on About page!?
use is_front_page() to determine the home page. like you only want slider on the home page then edit your header.php file that consist the slider part and do something like this
if( is_front_page() ):
// Front Page stuff like slider and
// whatever you want
endif;
Try this ,
if( is_home() || is_front_page() ){
//your home page content
}
else{
//other pages
}
For more here
Hope its works..
Make another template and set this template for your single pages. And then from backhand set it.
I usually create a front-page.php file, Wordpress will use that instead of index.php (which you can use as a generic template from then on).

Make another content list as content file of wordpress

I have page I want to display the page in different style (not as the content.php file ) so now I made copy the content.php file and just modified it. I want to display only for one page and other pages should display like content.php . So how can I change the index page to display the particular as new content-list page. My page name is News and it should be display like content-list.php.
For display indiviual page you have to make a Template for that page and from
Dashboard-->Pages open the page where you want to display that template, on right hand side you have seen TAMPLATE-->DEFAULT TEMPLATE, select template you have created...
Syntax for new template
<?php
/*Template Name:abc
*/
?>
<?php get_header();?>
<!--------------------------------------->
CONTENT FOR PAGE
<!--------------------------------------->
<?php get_Footer();?>
I don't know about which file you're referring to as content.php
I have page i want display the page in different style
So, if you want to display a page with a different style, you should have a look at WordPress Template Hierarchy.
You can create another page template, use custom files like header-{name}.php and footer-{name}.php and use get_header() and get_footer() with the appropriate arguments(the {name} you mentionned to call these files.

WordPress - displaying posts in a page

I would like to display the posts the way they are shown when you have "show latest post" selected under reading settings.
I've tried using query_posts, but that displays the whole post, not the chunk that appears in the preview with the link at the bottom.
any ideas what I should be querying to get that?
Edit
I forgot to mention
I tried using the_excerpt(), but that doesn't show the image in the post. Also the index.php file is using the the_content() and it's displaying it the way I want it to
If you don't want to show the whole post, you should use the_excerpt() instead of the_post()
Edit:
From codex:
<?php the_content('Read more...'); ?> Displays the content of the post and uses "Read more..." for the more link text when the Quicktag is used.
Basically, use the_content('your text for the link') and add the quicktag to your article, this will automatically just show the text before

Resources