Archived topic
GP Hooks
24 replies · Started by Nicholas Harvey on December 21, 2014
Glad I could help! :)
Hi Tom,
I'd like to place some text in the 'After Footer Widgets' hook. Simply three words, "Home . About . Contact" with links to those 3 pages & aligned in the centre of the page.
I'd like to have the ability to change the colour of the text and the background just for that band (ie the area between the footer widgets and the footer - because I want to experiment with different colours to blend with the rest of the page.)
What would be the code to achieve that?
(The page references for my test site are & 70)
Thanks,
IanH
Hi Ian,
You would need to use some basic HTML and CSS.
For example:
<div class="ian-custom-footer">
<a href="#">Home</a> - <a href="#">About</a>
</div>
Then the CSS:
.ian-custom-footer {
background: #000000; /* background color of the area */
color: #FFFFFF; /* text color of the area */
padding: 20px; /* inner spacing of the area */
}
.ian-custom-footer a,
.ian-custom-footer a:visited {
color: #FFFFFF; /* link color */
}
.ian-custom-footer a:hover {
color: #FFFFFF; /* link color when hover */
}
Hope this helps :)
Hi Tom, I tried several options listed above. What I am trying to do is attach two images in the Blog posts that are constant when a blog post is created. I used GP hooks throughout the site on all the pages with PHP in GP hooks. If you notice in the Blog page there is a "paper edge image that rests on top of the post content area. Above that a to line bar that should reside under the nave as in the other pages. I added the paper edge (top) in the Blog header but two things, it's not contained and of course not consistent each time a blog is posted. I tried to insert the maroon two line image under the nav by using PHP in GPhooks but does not show: GPHooks/After Header
<?php if ( in_category( ’4’ ) ) : ?>

<?php endif; ?>
and
the paper edge image: GPHooks/Inside Content Container
<?php if ( in_category( '4’ ) ) : ?>

<?php endif; ?>
You can see what I am talking about here: provinciawebdesign.com/client/ditp/blog
I still need to adjust the left sidebar.
is using GPHooks not the right direction or should it be css just for the posts. The pages worked great.
Thanks Tom, any help is appreciated.
Hi there,
Where are you adding the two lines for the regular pages? If you're using GP Hooks it should carry over into the blog as well.
For the paper, instead of using the Blog Page Header, use GP Hooks in the "Before Content" hook.
Let me know if that gets you any closer :)
Thanks Tom! it's all good now. followed your advice and customized the page across the entire site. I used HTML in GPHooks and PHP. Works on responsive as well.
Thanks again!
I'm no longer using the Blog header option. I created an image of the two combined aand placed it in a
ThanksTom!
Awesome! You're welcome :)
Because of the multiple categories that are within the site library, I am changing to a "Previous Page" button below the categories that I stacked using this CSS:
footer.entry-meta .cat-links a,
footer.entry-meta .tags-links a {
display: block;
float: left;
clear: both;
}
.tags-links:before,
.cat-links:before {
content: '';
}
That works fine.
I am now using GP-Hooks to add the button for "Previous Page" right below the above CSS placing it in the After Content hook. It works fine also but the button appears in the main category page of which I don't want to show so I changed the below code from "category" to "single" and the button still appears in the main category page.
How can I prevent the button from showing on the main category page?
<?php if ( is_single ('') ) : ?>
<input type="button" value="Previous Page" onclick="history.back(-1)" />
<?php endif; ?>
Any help is appreciated and thanking you in advance.
Hi there,
Any chance you can open a new support topic?
Thanks!