Forum Replies Created

Viewing 15 replies - 331 through 345 (of 459 total)
  • Thread Starter Scott DeLuzio

    (@scottdeluzio)

    I managed part of what I’m looking for.
    Specifically, I made a plugin that will activate on all new sites, which will create the default WooCommerce pages, and hide the two initial notices (Install WooCommerce pages, and allow tracking).
    If anyone else is trying to do this, you can find the code here.

    Next step is to play around with modifying the default settings https://docs.woothemes.com/wc-apidocs/source-class-WC_Settings_General.html#35-199

    I think the fix proposed by Koem may be temporary.

    If you visit the URL that shows up in the first video we’re all seeing, it indicates that support for certain devices will no longer be available after April 2015.

    I believe this video is serving more as a warning to update the method used to pull videos before support for this method is officially gone.

    It would be nice to see an update to the plugin that has a fix to remain compatible with the latest update.

    I realize this was posted months ago, but you can probably add some css to the theme to get it to display as you would like it to. I believe this will display in two columns as you described.

    .gfwa-odd, .gfwa-even {
      display: inline-block;
    }

    I was only testing on a site that had two posts in the home middle widget area, which worked, but if you set the widget to have more posts it may not display correctly. I didn’t get too crazy testing it, but know it will work if you play around with the css a bit.
    You might be able to also set this widget to only display one post, and insert the widget twice into the home middle widget area. The second instance would have the same settings as the first, except it would use an offset of 1 in the Number of Posts to Offset field.

    Adding my vote for Pickleball.

    Thread Starter Scott DeLuzio

    (@scottdeluzio)

    @chieftechdog that fix worked for me too. Thanks for the help!

    Seems like an easy fix on the developer’s side, so hopefully an update will come out to correct this problem soon.

    Scott DeLuzio

    (@scottdeluzio)

    Since there is no other code included, I am taking a guess at what you’re doing.
    It seems like the table should display as you want it. I went ahead and applied some CSS to this demo of what you’re doing. Specifically, I added a border, and height to the <tr> so you can see that the col-5 and col-6 row is having the correct row span.
    Maybe you need to style the table to get it to look the way you want it?

    Scott DeLuzio

    (@scottdeluzio)

    Look at the codex for is_page()
    You can probably do something like this:

    if ( is_page( 25 ) ) {
    // Display the custom header for this page - using 25 from the original post example. Replace 25 with the page id of the page you need to customize or use an array if multiple pages.
    } else {
    // Display the regular header to be used on all other pages.
    }

    Scott DeLuzio

    (@scottdeluzio)

    Do you have other users on your blog?
    To be sure, login to your site’s admin and click Users > All Users from the right side. Here you’ll see all the users on your site.
    If there are users who shouldn’t be there, then the are probably who are posting the spam to your site.
    You can delete those users, and you’ll be given the option to delete all of their content, which I would suggest you do.
    See this article for more info on deleting users.
    After you clear out all the users who shouldn’t be there, you should figure out how they got there in the first place.
    Check your site’s subscriber settings: Settings > General in the WP admin.
    On that page, see if the “Membership Anyone can register” box is checked. If your site doesn’t need people to register, then uncheck it. Also on the same page, check to see what the default role is for a new user. If it is set to Subscriber, then even if someone did get an account they wouldn’t be able to create or publish any posts. If it’s set to Administrator, Editor, or Author, then new users will be able to publish their own posts. Contributors would be able to create new posts but can’t publish them. See details on user roles here.
    If you go through all of that, and nothing seems out of the ordinary, you may have a security hole on your site somewhere that allows someone to either create a new account or post to your site as another user.

    Thread Starter Scott DeLuzio

    (@scottdeluzio)

    Thanks for the advice. I ended up figuring out what the problem was after you pointed out the 404 response. I’m including what I did to solve the problem in case anyone else has a similar issue.

    Initially I did try turning WP Super Cache off/clearing the cache as you suggested, but it still had the same result.

    When you mentioned the 404 response, I remembered that I also had the Sucuri Security plugin installed, and had the setting checked to “Restrict wp-content access”. On the plugin’s hardening settings page, it indicates:

    This option blocks direct PHP access to any file inside wp-content. If you experience any issue after this with a theme or plugin in your site, like for example images not displaying, remove the .htaccess file located in the content directory.

    Note: Many (insecure) themes and plugins use a PHP file in this directory to generate images like thumbnails and captcha codes, this is intentional so it is recommended to check your site once this option is enabled.

    Turning this setting off/removing the .htaccess file from wp-content allowed the map to function properly. I was able to turn WP Super Cache back on and the map still functioned correctly.

    Thanks for your help!

    Plugin Author Scott DeLuzio

    (@scottdeluzio)

    Hi Mark,
    You can wrap the ad code in a <div> and apply CSS styles to the div to align it as needed.

    For example, if you want to align the ad to the left and have text wrap around it you can use something like this:

    <div style="float: left;">
    <!-- Ad code goes here -->
    </div>

    If you need to add a margin to the ad so the text doesn’t touch right up to it, you can do something like this

    <div style="float: left; margin-top: 10px; margin: 10px;">
    <!-- Ad code goes here -->
    </div>

    Change the left to right depending on which direction you want the ad to go.

    Thread Starter Scott DeLuzio

    (@scottdeluzio)

    Wonderful, thanks!

    Thread Starter Scott DeLuzio

    (@scottdeluzio)

    This works in the plugin:

    //Sort CPT By Custom Field
    function sort_archive_loop($query) {
        if (is_post_type_archive('my-cpt')) {
        $query->set('meta_key', 'custom-field');
    	$query->set('order', 'ASC');
        $query->set('orderby', 'meta_value');
        }
    }
    add_action('pre_get_posts', 'sort_archive_loop');

    Thread Starter Scott DeLuzio

    (@scottdeluzio)

    The javascript error only showed up when I used the Inspect Element function in Chrome after clicking on the button to show the lightbox popup in the Views plugin.
    I have since switched to another theme and removed Tidy from my site, so I won’t be able to send a screenshot. The text quoted in the JavaScript error in the original post is exactly what I saw in the Inspect Element > Show Drawer > Console tab.

    Plugin Author Scott DeLuzio

    (@scottdeluzio)

    The short answer is yes, this is possible.

    The longer answer is that I initially created this with AdSense ads in mind. Google AdSense policies limit you to three ads on each page. Of course there are other ad networks that could use this plugin just the same, which may not have those restrictions. You could also try to test various ad sizes and eventually need more than three ad shortcodes while still falling within the policy of displaying three per page.

    After about an hour of “what-if’s” when I was developing the plugin, I eventually decided to stick with three shortcodes for simplicity’s sake. Perhaps in a future version of this plugin I’ll make it more dynamic so there isn’t a cap on the number of shortcodes available.

    In the meantime, if you want to manually add more shortcodes to this plugin, you can edit the adsense-inpost-ads.php file, and find all references to “adsense unit c”, copy and paste those lines and change the “c” to a “d” (or whatever identifier you want to use). So…

    • Line 45: copy add_option('oizuled-adsense-unit-c', ''); and paste add_option('oizuled-adsense-unit-d', ''); in a new line directly below it.
    • Line 51: copy delete_option('oizuled-adsense-unit-c'); and paste delete_option('oizuled-adsense-unit-d'); in a new line directly below it.
    • Line 60: copy register_setting( 'oizuled-adsense-option-group', 'oizuled-adsense-unit-c'); and paste register_setting( 'oizuled-adsense-option-group', 'oizuled-adsense-unit-d'); in a new line directly below it.
    • Line 85-91: copy
      function oizuled_adsense_c() {
      if(!isset($oizuledadsense_c)) {
      	$oizuledadsense_c = get_option('oizuled-adsense-unit-c');
      }
      	return $oizuledadsense_c;
      }
      add_shortcode('AdSense-C', 'oizuled_adsense_c');

      and paste

      function oizuled_adsense_d() {
      if(!isset($oizuledadsense_d)) {
      	$oizuledadsense_d = get_option('oizuled-adsense-unit-d');
      }
      	return $oizuledadsense_d;
      }
      add_shortcode('AdSense-D', 'oizuled_adsense_d');

      in a new line directly below it (but before the ending ?>)

    Then in options.php, you will need to copy lines 17-20

    <tr valign="top">
    					<th scope="row">Enter the AdSense code provided to you from your <a href="https://www.google.com/adsense" target="_blank">Google AdSense account</a>.</th>
    					<td><textarea rows="5" cols="36" name="oizuled-adsense-unit-c"><?php echo get_option('oizuled-adsense-unit-c'); ?></textarea><br />Use <strong>[AdSense-C]</strong> to display this ad.</td>
    				</tr>

    and paste

    <tr valign="top">
    					<th scope="row">Enter the AdSense code provided to you from your <a href="https://www.google.com/adsense" target="_blank">Google AdSense account</a>.</th>
    					<td><textarea rows="5" cols="36" name="oizuled-adsense-unit-d"><?php echo get_option('oizuled-adsense-unit-d'); ?></textarea><br />Use <strong>[AdSense-D]</strong> to display this ad.</td>
    				</tr>

    in a line directly below it.

    Repeat each of those steps for as many new shortcodes as you need.

    One caution – if you do this and the plugin gets updated in the future, all of your changes will be lost going forward. It will be important to keep a backup of your changes so you don’t accidentally lose any changes by applying an update.

    Plugin Author Scott DeLuzio

    (@scottdeluzio)

    Hi, I’m going to be pushing out an update to this plugin today that will address this issue. It was a bug in the plugin that should be fixed now. Try the update, and if it is still giving you trouble please let me know.

Viewing 15 replies - 331 through 345 (of 459 total)