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

yummyfur on "Where to find specific CSS instructions for plug in."

$
0
0

Hi, I have theme installed that provides me with a very minimal menu on the side. I will only be using lots and lots of pages therefore I needed a tight compact and clean side menu.

This is what the menu looks like with the standard theme http://s16.postimg.org/ms8lv4e5h/standard.jpg

I wanted the menus to have a less cluttered look and I paid someone to make a plug in for me that contains this CSS code which does almost everything I want. See below. If you go to the site you can see how plugin manipulates the standard menu. http://sexologist.guru/wordpress

However now that I understand that this is all it took to do almost exactly what I wanted, I see it's not very difficult and there's a few other things I'd like to add to the plug to tweak it because the plugin maker is very slow and painful to deal with and I just want to finish it myself. So my question is this...

Can someone point me to where I would find instructions for the CSS code I wish to add. It's only really simple stuff. Like I want to be able to change the colours for the Children and Grandchildren, and stuff like that. I'm happy to learn it myself rather than ask for the code but I don't know where to begin to find out the type of things that I am able to add to this plugin with respect to the menus.

Thanks,

—Andrew.

nav.page-nav li { text-transform: uppercase; }
nav.page-nav ul.children li { text-transform: none; }
nav.page-nav li.current_page_item a {
    background: #9d0706;
    color: #fff;
    padding: 3px;
}
li.current_page_item ul.children li a {
	background: none;
    color: #555;
    padding: 0;
}
ul.children li.current_page_item ul.children li a {
	background: none;
    color: #555;
    padding: 0;
}
nav.page-nav .children { display: none; }
li.page_item_has_children.current_page_item > ul.children { display: block; }
.current_page_parent > ul.children { display: block; }
.current_page_ancestor > ul.children { display: block; }

ScottBoySlim on "[Plugin: Slideshow] Alignment"

$
0
0

I'm looking to align my slideshow.

If you look at this image, I am trying to remove the spacing of the red section.

Pretty new to code and wordpress and general so if anyone could help would be appreciated!

Cheers!

jvboimonkiboi on "How to enclose a lazy loader in a bordered table?"

$
0
0

Hi everyone,

I am looking for a way to enclose my lazy loader inside a table. How will I do that? I already set all my posts into lazy load. However, I don't like the idea that the length of my page also increases every time the lazy load plugin loads the other posts. I want to enclose it inside a table to keep my page short.

Thanks,
JV

viktan on "Website Hacked"

$
0
0

Hello

My website has been hacked and now I am not able to login to wordpress

someone has changed the passwords, emails etc..

Please help

How can access the wordpress again..

Thanks

TriangleAE on "Hueman Static Page with slider and posts below?"

$
0
0

In the hueman theme you can have a static page of a page that will include a slider.

I would like to either have a static page of my latest posts with that slider

or a static page of a page with page thumbnails and excerpts below that slider

http://philharmonic-association.org/wordpress/

thanks for any advice

MFSAM on "Multiple post_types with the function count_user_posts"

$
0
0

Hi,

I see since 4.1 that this function allows you to see how many posts a user has published within custom post types.

For example, I can find out how many posts user 9 has published under the post type 'film' by using count_user_posts( 9 , "film" )

However, is there a way that I can get the count for all of his posts from all our post types combined rather than just the one?

Up until yesterday I had been using this...

$curauth = (get_query_var('author_name')) ? get_user_by('slug', get_query_var('author_name')) : get_userdata(get_query_var('author'));
$args = array(
	'author' => $curauth->ID,
	'post_type' => 'any'
);
$posts = new WP_Query($args);
$post_count = $posts->found_posts;

That was until it stoped working for me in the application I need it to (page of authors).

Any help would be much appreciated,
Sam

hilman050 on "Remove plugin-items from dashboard-menu"

aidansoule on "WooCommerce Allow Checkout in Multiples Only not working for WooCommerce"

$
0
0

Hi There, can someone please help!
The code below no longer works for WooCommerce version 2.3.5 does any body know what needs to be changed?

<?php
// check that cart items quantities totals are in multiples of 6
addaction( 'woocommercecheckcartitems', 'woocommercecheckcartquantities' );
function woocommercecheckcartquantities() {
global $woocommerce;
$multiples = 6;
$totalproducts = 0;
foreach ( $woocommerce->cart->getcart() as $cartitemkey => $values ) {
$totalproducts += $values['quantity'];
}
if ( ( $totalproducts % $multiples ) > 0 )
$woocommerce->adderror( sprintf( _('You need to buy in quantities of %s products', 'woocommerce'), $multiples ) );
}
// Limit cart items with a certain shipping class to be purchased in multiple only
addaction( 'woocommercecheckcartitems', 'woocommercecheckcartquantitiesforclass' );
function woocommercecheckcartquantitiesforclass() {
global $woocommerce;
$multiples = 6;
$class = 'bottle';
$totalproducts = 0;
foreach ( $woocommerce->cart->getcart() as $cartitemkey => $values ) {
$product = getproduct( $values['productid'] );
if ( $product->getshippingclass() == $class ) {
$totalproducts += $values['quantity'];
}
}
if ( ( $totalproducts % $multiples ) > 0 )
$woocommerce->adderror( sprintf( _('You need to purchase bottles in quantities of %s', 'woocommerce'), $multiples ) );
}
?>

Thanks


heegy on "WP PhotoAlbum Plus: shortcode, do_shortcode, API call create different output"

$
0
0

Hi, I am a WP newbie and currently creating my first WP website. I installed - among others - the WP PhotoAlbum Plus plugin in order to provide user (member) specific photo albums. Page title is identical too WPPA album name.

As you can see in the snippet below, I tried 3 approaches to display a slideshow of the desired album:
1) using php do_shortcode()
2) using php wppa_albums()
3) using shortcode

Problems: 1) and 2) produce a corrupted output, image parts are missing etc.
3) works fine, bit I didn't make it yet to use $title inside the shortcut

I would prefer 1) and 2), but I don't have a clue what is going wrong.

Can anybody help me?

Thanks,
Michael

[ultimatemember form_id=196]
<h3>Fotoalbum</h3>
[insert_php]
if ( function_exists( 'wppa_albums' ) )
{
   // wppa is active
   // get page title (has to be identical to "firstname surname")!!!
   $title = get_the_title($post);
   // get user album's numerical id by name (page title)
   $id = wppa_get_album_id_by_name($title);

   echo("Variant 1: using do_shortcode");
   echo do_shortcode("[wppa type=\"slideonlyf\" album=\"$"."{$title}\"][/wppa]");

   echo("Variant 2: using wppa_albums()");
   $my_before = '';
   $my_after = '';
   $my_text = $my_before;
   $my_text .= wppa_albums( $id,'slideonlyf', 'auto');
   $my_text .= $my_after;
   echo($my_text);
}
[/insert_php]

Variant 3: using shortcode without PHP
[wppa type="slideonlyf" album="$Michael Heeg"][/wppa]

hamid_rmg on "How can I handle a form that I add it to dashboard whit my PHP page"

$
0
0

Hi friends
I add a form to dashboard for my theme settings.
It works correctly.
But I want to know that how I handle any form in dashboard with my own PHP scripts!
for a simple example I have a form like this:

<form id="myform" method="post" action="???">
	<textarea name="text01"></textarea>
	<input type="submit" value="Send">
</form>

now I add it to dashboard but I want handle this for with my own PHP code (myhandler.php) like this:

<?php
$txt = $_GET['text01'];
$op = fopen('mysaves.txt', 'w');
fwrite($op, $txt);
fclose($op);
echo 'Your values are saved!';
?>

please help me about this:
if myhandler.php be in my theme folder, then what will be my form's action address?

Corneliatt on "Strip down get_the_title() - compare with CPT"

$
0
0

Hi! I've got a query that looks like this:

$title = get_the_title();

$new_query = new WP_Query(array('faq' => $title, 'post_type' => 'question_faq', 'orderby' => 'rand', 'showposts' => '1'));

This works perfectly, until $title got "!?>åäö" etc. Is there a way to strip down all this "extras", or get a "slug version" of a the_title()? Or do you have any other ideas of how to compare my custom post type "faq" slugs with the_title?

Thank you in advance!

Hatul666 on "Cant find the function that echos the files directory"

$
0
0

Hi guys,

I want to include some JS to my theme.
I created a folder called "js" in my twentyfifteen child theme folder.

When I want to call the file I write the whole text. is there a function that does that in a more simple way instead of typing the whole directory myself?

<script type='text/javascript' src='http://54.149.xx.xx/wp-content/themes/twentyfifteen-child/js/scroll.js'></script>

Hatul666 on "How to create my own get_function() that outputs a code part from a template"

$
0
0

I want to add a code that shows up in some of my page templates.
There are the functions like get_footer() (echo get_footer();) that outputs the code part from footer.php - How do I create my own?

leemon on "Switch to the library tab in the media uploader"

$
0
0

I'm developing a plugin that adds a tab to the media uploader to add external videos to the media library via oembed. Everything works as expected but I need to switch to the library tab after adding a new external video via the new tab. This is part of the code I'm using:

wp.media.controller.Custom = wp.media.controller.State.extend({

    initialize: function(){
        this.props = new Backbone.Model({ custom_data: '' });
        this.props.on( 'change:custom_data', this.refresh, this );
    },

    refresh: function() {
        this.frame.toolbar.get().refresh();
    },

    customAction: function(){
        wp.media.post( 'add-oembed', {
            url:     this.props.get('custom_data'),
            post_id: wp.media.view.settings.post.id
        });

        this.frame.content.mode('browse');

    }

});

The line this.frame.content.mode('browse') is supposed to make the switch to the library tab, but I'm getting an error message that says: TypeError: this.collection is undefined.

Any ideas?

collinsavenue on "How to disable pointers or better yet hide with css?"

$
0
0

I run a multisite and gravityforms. When using the following code (or any other code I could find) the pointer error still shows up. Is there a function that would save into db that never use pointers?

$lumpy_disable_pointers = new lumpy_disable_pointers;

class lumpy_disable_pointers {

	public function __construct() {

		add_action( 'wp_default_scripts', array( $this, 'no_pointer_script' ) );
		add_action( 'wp_default_styles',  array( $this, 'no_pointer_style'  ) );

	}

	function no_pointer_script( $scripts ) {

		$scripts->remove( 'wp-pointer' );

	}

	function no_pointer_style( $styles ) {

		$styles->remove( 'wp-pointer' );

	}

}

Been looking solutions for hours and it is driving me crazy.

Error I get with every snippet: "Uncaught TypeError: undefined is not a function" and most of it is red.

setup = function () {
					$('li.toplevel_page_wpseo_dashboard').pointer(wpseo_pointer_options).pointer('open');
										jQuery('#pointer-close').after('<a id="pointer-primary" class="button-primary">' + 'Start Tour' + '</a>');
					jQuery('#pointer-primary').click(function () {
						document.location="http://domain.com/test5/wp-admin/admin.php?page=wpseo_dashboard";					});
										jQuery('#pointer-close').click(function () {
												wpseo_setIgnore("tour", "wp-pointer-0", "c225a4f7e3");
											});
									};

				if (wpseo_pointer_options.position && wpseo_pointer_options.position.defer_loading)
					$(window).bind('load.wp-pointers', setup);

Really appreciate if someone could help.

Thanks.


metronom3 on "How to automatically create a post from JSON instead of RSS"

$
0
0

Instead of using RSS feeds to automatically update my blog using plugins such as WP Robot 4 or AutoBlog, I would like to use a JSON feed and to store the featured image from the JSON... Any ideas of a plugin I could use to do this? My host supports CRON so that could be used to automatically update the blog every 12 hours etc?

An example of the feed that im using is;

http://pipes.yahoo.com/pipes/pipe.run?_id=1120c2e787ea88eb5ff4ee6cea1ec1e6&_render=json

Which can be seen
http://jsonviewer.stack.hu/

The reason im trying to use Json instead of RSS is that I cannot get the imaage url to export to the RSS but the element is present in the JSON which is Item.News:Image

jenvape on "Help me move this "Layered Nav Widget" off Home Page!"

$
0
0

Hello all!
I am pretty sure this will be a very simple cut and paste job, so I don't exactly want to hire it out if a kind person on this forum could simply walk me through it.

Please see https://vapevine.ca
Notice the left side bar?

I would simply like to move the 'sorting nav widgets' (Filter by Price, Filter by Brand, Filter by Color, Filter by Ohm) to appear ONLY on the interior product category pages "/product/" and NOT on the home page anymore, since they currently have no sorting function on the index.

So, the filtering nav would continue to appear here: https://vapevine.ca/product/starter-kits/ and here: https://vapevine.ca/product/tanks-clearomizers/ and on every product category listing page just NOT ON THE HOME PAGE.

This is called an ISOTOPE container, right? The sorting function works great, I just want to move the isotope off the index to work on the interior pages.

I believe I have found the code on the index.php template (BELOW)...I am afraid to just delete it and paste it somewhere like the content-page.php?

Also, take note that it is a responsive site and this is an "off-canvas navigation menu" that slides into view on mobile. Not sure if that matters.

... NEED YOUR HELP! ANY ADVICE?

<div class="blog-isotop-container">

<div id="filters" class="button-group">
<button class="filter-item is-checked" data-filter="*">show all</button>
</div>

<div class="blog-isotope">
<div class="grid-sizer"></div>

<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>

<div class="blog-post hidden <?php echo get_post_format(); ?>">
<div class="blog-post-inner">

<h1 class="entry-title-archive">
" class="thumbnail_archive">
<span class="thumbnail_archive_container">
<?php the_post_thumbnail('blog-isotope'); ?>
</span>
<span><?php the_title(); ?></span>

</h1>

pipspeak on "html tags in tinyMCE meta box not being encoded on page"

$
0
0

I have a meta box that uses tinyMCE instead of a plain textarea, but all html tags I use are simply being passed as text instead of correctly rendered on the page. Seems to be a filters issue, but I have no idea where to apply filters in the meta box functions. I would basically like to use exactly the same filters and html decoding in this meta box as are used in the post's main tinyMCE-powered text area.

I added tinyMCE using this code:

$value = get_post_meta( $post->ID, 'new_field', true );
$editor_id = 'new_field';
$settings = array( 'media_buttons' => false );
wp_editor( $value , $editor_id, $settings );

When saving I apply esc_textarea:

$my_data = esc_textarea( $_POST['new_field'] );

Sometime between that and the page, the HTML tags just get ignored. Any suggestions appreciated.

jon.sig on "send_to_editor"

$
0
0

Hey guys,

I'm working on a plugin.
It creates a new media_upload_tab and runs a code where an image is added to the gallery with media_sideload_image.
Now I would like to put this image (the html code generated) in the editor where my cursor was (just like the standard image inserting function) and close the iframe.

Can you help me with this?
Is there a function to add code to the editor in the parent element?

Thanks,
Jonas

websiter123 on "wpadminbar (Wordpress Header Bar on Top)"

$
0
0

Hi, I want to get rid of the wordpress header bar which appears on top of my website. I have built my website on top of a theme(Explicit for reviews) I purchased.
How to go about it? Thanks in advance..

Viewing all 8245 articles
Browse latest View live




Latest Images