Community Forums › Forums › Archived Forums › Design Tips and Tricks › blog template page customization
Tagged: blog template
- This topic has 9 replies, 2 voices, and was last updated 11 years, 11 months ago by jtdatawork.
-
AuthorPosts
-
January 2, 2013 at 7:22 pm #9090jtdataworkMember
I need to add a photo before the content on the blog template page only. How can I do this?
Thanks!
JT Dataworks Web design and SEO
January 3, 2013 at 5:24 am #9142Brad DaltonParticipantUse a conditional tag (for the blog page template or post i.d) with a custom function or the Genesis simple hooks plugin. http://www.studiopress.com/plugins/simple-hooks
if (is_page_template( 'blog.php' ))
http://codex.wordpress.org/Conditional_Tags#Is_a_Page_Template
January 3, 2013 at 5:59 pm #9314jtdataworkMemberSorry to be so thick, but I'm not good at php. I tried to put the following into the before content simple hook block but nothing shows up...
Not sure if it's because the code is wrong, but if I just put the photo url in, it shows up, albeit on all pages. So this seemed logical. What am I doing wrong?
<?php if (is_page_template( ‘blog.php’ )) {?>
<img src="http://www2.denisemazzola.com/wp-content/uploads/b-blog.jpg">
<?php }?>
JT Dataworks Web design and SEO
January 3, 2013 at 7:02 pm #9327jtdataworkMemberUpdate, I tried this:
<?php if (is_page_template( ‘page_blog.php’ )) {?>
<div class="blog-page">
<?php }?>And added the photo in the css to the class .blog-page. This almost worked. The photo does show up now, but it also seems to be affecting the regular pages as the photo can be seem behind the banners on the regular site pages. see http://www2.denisemazzola.com/become-a-dog-professional-2/
On the blog page it looks like this http://www2.denisemazzola.com/blogging-about-dogs/
Why isn't it excluding the photo from the regular pages? Help! My client wants to launch this site in the next few days. I thought this would be simple. Boy was I wrong. 🙁
JT Dataworks Web design and SEO
January 4, 2013 at 12:07 am #9418Brad DaltonParticipantThe code i gave you is only a solution for the conditional tag. You'll need to write the code and include the conditional tag. Maybe Nick can help if you send a email to support.
January 4, 2013 at 2:10 am #9434Brad DaltonParticipanthttp://dreamwhisperdesigns.com/genesis-tutorials/add-content-genesis-blog-page-template/
Try this.
What i did was register a new widget area and hook it in using a conditional tag but i also added a page_blog template in the child theme.
January 4, 2013 at 7:19 pm #9638jtdataworkMemberHi Brad,
Thanks! That got me almost there. You are officially my new hero.I did not have to register the widget, I just added the code you pointed me to, to my page_blog template and the background in the style sheet started showing. So now I have a blog template page with the correct image showing. The only problem is things are not displaying right. The background image is off about 5 px and there is a page title ABOVE the image pushing it down the page, and which I designated in my theme functions to NOT show up (any of my page titles).
Any thoughts on how I can correct these final problems?
JT Dataworks Web design and SEO
January 5, 2013 at 1:38 am #9695Brad DaltonParticipantYou can align the image using the Advanced Image Settings horizontally or vertically.
You can also hide the title using CSS
January 5, 2013 at 1:49 pm #9773jtdataworkMemberI hit a snag doing this, turns out my cleint want to use categories, meaning that I will need an archives template instead of (or in additon to) a blog page template. Do you think it will it work to add this template just like I did the Blog Page?Thnx.
JT Dataworks Web design and SEO
January 5, 2013 at 6:55 pm #9823jtdataworkMemberYay! OK! Hiding the title with CSS - worked great!
Changing the alignment on the image, I figured out with a tweak to CSS also. I had a content padding that was throwing it off.
Thank you! The last little problem I'm having really should be in a new thread, so I'm going to mark this resolved. Brad, thanks so much for taking the time to help. It was a lifesaver!
JT Dataworks Web design and SEO
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.