Redirection of Read more
-
After hours of learning thought id resolved it, but not 🙁
Quick explanation as follows:
The 4 home pages on my static word press site currently point to the 4 individual services pages, when I click the Read more button.
What I want to do i hide the pages from the navigation bar (done), create a page called services and then have the 4 homepages click to the overall page ‘services’.
Thanks however it confusing the life out of me.
Any step by step instructions would be well appreciated. PLEASE.
Deleted duplicate thread in general talk section.
You can hide read more buttons pointing to the page with CSS and then create a custom read more button with a link to external site/page.
Example,
<a class="block-button" href="http://domain.tld/page">Read more</a>What’s the URL of your site?
Thanks Prasanna,
The URL is http://www.eqoilfield.com
My design knowledge is improving however this time I am beaten 🙁 If you could give me a quick breakdown of how to do this I would be so appreciative. Really struggling.
Thanks
Where do you want the individual homepage panes to be linked?
You can also use graphene_bottom_content action hook and replicate the homepage panes, of course with custom links.
Do you want all the 4 Read more buttons in homepage panes to link to this page? – http://www.eqoilfield.com/?page_id=125
You can change the DOM to replace Read more link once the page is loaded. If it sounds okay, add this to custom
<head>tags in Graphene Options –> Advanced.<script type="text/javascript">
jQuery(document).ready(function($){
$('.homepage_panes').ready(function(){
$('.homepage_panes .post-comments').html('<a class="block-button" href="http://www.eqoilfield.com/?page_id=125">Read more</a>');
});
});
</script>Or, add this to child-theme’s functions.php
function homepage_panes_change_readmore_link() {
if(is_front_page() {
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$('.homepage_panes').ready(function(){
$('.homepage_panes .post-comments').html('<a class="block-button" href="http://www.eqoilfield.com/?page_id=125">Read more</a>');
});
});
</script>
<?php
}
}
add_action('wp_head','homepage_panes_change_readmore_link');Pransanna
Firstly thanks for taking the time out to help me. Really appreciated.
I have put the above code into the child fuctions php file ensuring it has been placed between.
<?php ?>Unfortunatly it returned a file server error. I went into my root server and removed this code in order that the website works. Am i doing something wrong in placing the code in between
<?php ?>Thanks
Mark
Closing php tag is not necessary. You should be using the code like this,
<?php
function homepage_panes_change_readmore_link() {
if(is_front_page() {
?>
<script type="text/javascript">
jQuery(document).ready(function($){
$('.homepage_panes').ready(function(){
$('.homepage_panes .post-comments').html('<a class="block-button" href="http://www.eqoilfield.com/?page_id=125">Read more</a>');
});
});
</script>
<?php
}
}
add_action('wp_head','homepage_panes_change_readmore_link');Can you post the content of your chuld-theme’s functions.php? Use pastebin.com to share code.
Viewing 10 posts - 1 through 10 (of 10 total)
- You must be logged in to reply to this topic.
