Skip to content
WJunction - Webmaster Forum

How to use "if" in this code?

Status
Not open for further replies.
Hello guys,


Maybe someone can help me.


I'm using tradeexpert script in my wordpress blog.
To use skimming traffic, I changed the following code in my homepage:


From:
PHP:
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">


To:
PHP:
<a href="/webmasters/out.php?s=100,75,65&u=<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">


Now I have installed this plugin:
https://wordpress.org/plugins/page-links-to/


Screenshot of the plugin:
screenshot-1.png



My idea is to use always this code in my posts:
PHP:
<a href="/webmasters/out.php?s=100,75,65&u=<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">


But when I use a custom URL I want to use the default code:
PHP:
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>">


Would be great if someone can help me with this :)


Plugin code:
https://paste2.org/4Fa60fpe


Thank you guys and a happy weekend to all!
 

3 comments

use this

before line 229 add these lines

PHP:
// MrQaidi start 
if($_POST['cws_links_to_choice'] =='custom'){
    $_POST['cws_links_to'] = '/webmasters/out.php?s=100,75,65&u='. $_POST['cws_links_to']; 
  }
 // MrQaidi end

as you see php code to check if choice is custom then add /webmasters/out.php?s=100,75,65&u= before url.

i hope this is was you asking
 
Status
Not open for further replies.

About the author

D
Active Member · Joined
806
Messages
18
Reactions
18
Points

Advertise on WJunction

Reach 1000's of webmasters, hosts & affiliates. Banner & sponsored-thread slots available.

Contact us
Back
Top Bottom