|
#1
Jul 5, 2009, 06:44 PM
|
|
Pardon me if this has already been asked, but I've been searching the forums since yesterday to no avail. I have the Wordpress reading settings option for a "posts page" enabled. It's currently showing a single post at a time on this designated page, and is working well with next/prev navigation for posts therein. The first thing displayed in this "posts page" is the first post's title. How can I add static text/images before the first/only post title that appears on this page?
TIA!
|
#2
Jul 6, 2009, 07:23 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Are these text/images going to be part of the post? Only on the first post/page (ie if you go to the next post/page you want it gone)?
What version of Atahualpa are you on?
What version of Wordpress?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
Jul 12, 2009, 01:11 PM
|
|
Sorry for the delay, and thanks very much for the reply.
Atahualpa 3.4, Wordpress 2.8
I would like this static text/banner to appear above every post on my "posts page" -- e.g., it will stay with the page when the visitor hits next/prev. My reasoning behind this is aesthetic, just trying to create a sort of title header for this posts page. It should not be part of the post itself. Hope that clarifies.
|
#4
Jul 14, 2009, 08:50 PM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Add it somewhere at Style & Edit CENTER COLUMN -> Content ABOVE the LOOP
|
#5
Jul 25, 2009, 04:10 PM
|
|
The "above the loop" inserts seem to put my banner above every page, but I'd like to only have it over my posts page. Is there PHP function which only echoes the text if it's my posts page?
|
#6
Jul 29, 2009, 12:39 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
you could use the 'is_posts()' function in an if in your code
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
Aug 30, 2009, 03:50 PM
|
|
My very late reply! I tried the following in my above the loop content code to no avail (nothing is printed):
<?php if ( is_posts() ) { ?>
My banner text
<?php } ?>
..Help
|
#8
Aug 31, 2009, 11:29 AM
|
|
|
|
3,768 posts · Oct 2008
Munich, Germany
|
|
Use is_single() for single post pages
|
#9
Sep 5, 2009, 01:55 PM
|
|
Flynn and juggledad, thanks for your replies. Still unable to see my banner text here. I wonder if my syntax is wrong? This snippet is the first PHP that appears in the "Content ABOVE the LOOP" box in the "Style & edit CENTER COLUMN" section.
<?php if ( is_single() ) { ?>
My banner text
<?php } ?>
I've also tried replacing "My banner text" with an echo statement. My posts page still shows the post title as the first text on the page.
|
#10
Sep 8, 2009, 05:24 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
what's the url showing an example? this is odd because I just copied your code and I get 'My banner text' as the first thing in the center column.
Make sure that this code is not mixed in with the other code in the "Content ABOVE the LOOP" I put it as the very first thing.
Copy the entiry "Content ABOVE the LOOP" and paste it here so I can look at it.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#11
Sep 12, 2009, 01:02 PM
|
|
I reset the Style/Edit Center Column page to defaults, and then re-pasted my echo statement. Still no dice, although I did learn something. When I click on my left navbar link to the single posts page, it does not display "My banner text." However, if I preview a post from within the "Add new post" in WPAdmin interface, "My banner text" does display. It will continue to display as I use Next/Prev navigation to jump between my two example posts.. but when I click on my left nav bar element to go to my posts page, "my banner text" disappears. Hope this sheds some light on this.
Here is my "above the loop" PHP:
<?php if ( is_single() ) { ?>
My banner text
<?php } ?>
<?php /* For MULTI post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_page_links('Top'); ?>
<?php /* For SINGLE post pages if activated at ATO -> Next/Previous Navigation: */
bfa_next_previous_post_links('Top'); ?>
<?php /* For the plugin Page2Cat http://wordpress.org/extend/plugins/page2cat/ */
if( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } ?>
|
#12
Sep 15, 2009, 10:27 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Ok, now I see what is happening. Terminology, Terminology, Terminology.
While you might think that if you set the maximum posts to show on a blog page to 1 (dashboard->settings->reading->Blog pages show at most [ ] posts) that the test 'is_single()' would work, but it will not because the blog page is considered a non-single page. Once you jump to the single post pages, then the banner shows up.
If you only want the banner to show up on the pages with single posts and you want the banner to show up on the blog page and any of the single pages, you could use
HTML Code:
<?php if ( is_single() or is_home() ) { ?>
My banner text
<?php } ?>
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13
Nov 12, 2010, 04:59 AM
|
|
How about I want to show an static image above the post on all pages and categories.
please check my blog: http://rayrey.com
Kindly help
|
#14
Nov 12, 2010, 06:13 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Put the image code in 'The contents ABOVE the LOOP'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#15
Nov 12, 2010, 06:27 AM
|
|
well, thank you it works!
|
Thread Tools |
Search this Thread |
|
|
Display Modes |
Linear Mode
|
|