Permalink

  • Frym1

    #7036

    Morning all.

    I have created a page called slider 1 and inserted a featured image.

    I have then gone > Graphene Options > Slider Options > Slider display style, and select Background image and excerpt.

    Is there a way I can stop the person visitng the website clicking on the slider image and going to that page. I.E Stop permalink?

    Thanks

    Mark

    Admin

    Syahir Hakim

    #36600

    Add to Custom CSS:

    .slider_post .permalink-overlay {
    display: none;
    }

    Frym1

    #36601

    Thanks. I also would like to do the same for the homepanes Not the read only links at they have been redirected to correct page, but for the images only.

    I made up the following code (trying to learn), but didnt work.

    .homepage_pane_image .permalink-overlay {
    display: none;

    }

    Could you please point me in right direction.

    Thanks

    Admin

    Syahir Hakim

    #36602

    You can’t simply come up with the CSS classes like that. They are defined in the page’s HTML, and the CSS codes you write need to reference the specific class or ID for the element that you want the CSS code to apply to.

    And the same code won’t work in this case also, because hiding the link will hide the image as well. You’ll need to resort to JavaScript to remove that link.

    Frym1

    #36603

    Thanks mate.

    Im trying to learn I am. Is there a book / or course that you could recommend of where I can learn website coding for word press.

    Thanks mate

    Anonymous

    #36604

    I suggest that you don’t have child-theme installed. First let’s do that:

    Child themes

    Or you can download the theme from Prasanna web-site (under “download” section)

    http://www.prasannasp.net

    After that put this code inside of your child theme functions.php file, (if you install child-theme from Prasanna SP site, you already have that file), create one blank file and name it functions.php and upload it to your child-theme folder.

    Than insert this code in child-theme functions.php:

    <?php
    function graphene_homepanes_nolink_img() {
    ?>
    <script type="text/javascript">
    jQuery(function($){
    $("div.homepage_panes a:has(img)").each(function() { $(this).replaceWith($(this).children()); })
    });
    </script>
    <?php
    }
    add_action('wp_footer','graphene_homepanes_nolink_img');
    ?>

    Anonymous

    #36605
    Quote:
    Thanks mate.

    Im trying to learn I am. Is there a book / or course that you could recommend of where I can learn website coding for word press.

    Thanks mate

    First start with basic HTML / CSS, than when you feel comfortable start with php, jquery and wordpress. For some basic using of WordPress you can refer to Google and find some tutorials.

    My suggestion:

    From PSD to HTML

    W3schools.com

    Anonymous

    #36606

    Even tighter code. Add this to Custom <head> Tags in Graphene options.

    <script type="text/javascript">
    jQuery(document).ready(function($){
    $('.homepage_pane').find('img').unwrap();
    });
    </script>

    Anonymous

    #36607
    Quote:
    Even tighter code. Add this to Custom <head> Tags in Graphene options.

    <script type=”text/javascript”>

    jQuery(document).ready(function($){

    $(‘.homepage_pane’).find(‘img’).unwrap();

    });

    </script>

    Nice one! 🙂

    I’m just not on that level at this time with js.

    But I try to stimulate him to create a child theme.;)

    Anyway, use Prasanna code, it’s better and lighter.

    Anonymous

    #36608
    Quote:
    But I try to stimulate him to create a child theme.;)

    I tried that before. But he messed up functions.php and got internal server errors – https://forum.graphene-theme.com/graphene-support/redirection-of-read-more-1#post-32696 That’s why I asked him to put the code in Custom head tags. 🙂

Viewing 10 posts - 1 through 10 (of 11 total)

  • 1
  • 2
  • You must be logged in to reply to this topic.
Do NOT follow this link or you will be banned from the site!