• Need someone to help me find a rewrite a brief couple lines of code in my Theme that will allow me to take out the Next/Previous links at the bottom of my posts. I have contacted the support page for the theme and am not getting a response. The theme is “Precisio”

    I am using the free version. You can find it here: http://theme4press.com/tag/free/
    If you think you can help, please let me know.

Viewing 15 replies - 1 through 15 (of 29 total)
  • Post the code that you currently have and we can work together.

    And am I write in assuming all you want to do is get rid of ‘Next’ and ‘Previous’ buttons?

    If so just target it and hide it with css like so:
    (add this to your child themes CSS file)

    .prev, .next { display:none; }

    That should remove the next/previous links on each post page.
    Hope this helps.

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    Thats the problem, I dont know. I tried according to an article I found and it took down the entire site. Here is the code, it is extremely long:

    [removed – please use a pastebin per the forum guidelines]

    That code is far too long, remove it before a moderator takes it down

    Also if you really want to hack up the core files of that theme, just remove these lines:

    <?php next_posts_link( '<span class="nav-prev fl">'. __( '<span class="meta-nav">←</span> Older posts', 'theme4press' ) . '</span>' ); ?>
    <?php previous_posts_link( '<span class="nav-next fr">'. __( 'Newer posts <span class="meta-nav">β†’</span>', 'theme4press' ) . '</span>' ); ?>

    but as I stated in my previous comment, using CSS is cleaner/quicker. Just copy the CSS I provided above, and place it in your theme’s CSS file, and the links will disappear.

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    I put it in the custom css file and they are still there. Is that the right place

    what do you mean custom css? are you working off a child theme? Or off the main theme?

    either way youll need to get in to your style.css file and place it there

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    This is what it says in the style.css

    WARNING! DO NOT EDIT THIS FILE!

    To make it easy to update your theme, you should not edit the styles in this file. Instead use
    the custom.css file to add your styles. You can copy a style from this file and paste it in
    custom.css and it will override the style in this file. You have been warned! πŸ™‚

    Ok, so add it to the custom.css and add an !important; tag to override the defaults, like so:

    .prev, .next { display:none !important; }

    But it states there that adding anything to your custom.css should over write the style.css so even with out the !important tag it should be working. Try it with the !important tag. I think the original styles are not in styles.css, but inside of a .php file.

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    Where do I put that code? After the original one you gave me?

    No just replace the other code with this one inside of custom.css, so you only have this one line

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    Arrows still there. see it is a challenge

    If I add, display: none; to those two classes on my end in the inspector, they disappear. So that code is correct, you may just not be placing it in the right spot.

    Your custom.css stylesheet isn’t even being loaded by the browser. So that’s why they are still there.

    All of your styles are being called out of a gzip.php for some reason.

    Thread Starter WelcomeHomeJoe

    (@welcomehomejoe)

    Sorry for sounding so stupid, Im not a “Code” guy

    It’s all being called out of this file:
    http://theme4press.com/wp-content/plugins/scripts-gzip/gzip.php?css=wp-content%2Fthemes%2Fthematic%2Fstyle.css

    If all else fails you can just add it to that file. But your main style.css and custom.css are not being loaded, so anything you write in there isn’t going to affect anything.

Viewing 15 replies - 1 through 15 (of 29 total)

The topic ‘Need someone to help me with a short php code’ is closed to new replies.