Forum Replies Created

Viewing 15 replies - 16 through 30 (of 62 total)
  • Thread Starter kjgbriggs

    (@kjgbriggs)

    Anyone?

    Thread Starter kjgbriggs

    (@kjgbriggs)

    Anyone?

    Thread Starter kjgbriggs

    (@kjgbriggs)

    Update: I have tried a lot on this, and tried using the $content attribute to get the page content (with closing tag) but it isn’t working.
    Below I have posted the code for the plugin, and the shortcode being used.
    What happens is the body text isn’t visible, at all, if I use a url query, but when I don’t the only way to get stuff up is to use my error message.
    I am not convinced the $content tag actually works how I am using it, and think the content is being lost somewhere.

    I also need to stop the text from showing up in the editor, as in the page edit screen it also displays.

    Shortcode
    [legal-content]This is some =productname= product.[/legal-content]
    Code

    <?php
    /**
    * Plugin Name: Dynamic Legal Page
    * Plugin URI:
    * Description: This plugin allows developers to pass URL arguments to change page content.
    * Version: 1.0
    * Author: Kyle Briggs
    * Author URI: https://www.kylebriggs.co.uk/
    * License: LGPL
    */
    
    add_filter('query_vars', 'parameter_queryvars' );
    function parameter_queryvars( $qvars )
    {
    $qvars[] = 'productname';
    return $qvars;
    }
    
    //Register Shortcode
    
    function legal_content_function() {
    
    	?>
    	<div class="et_pb_row"">
    	<?php
    
    //echo "<h1>Product Legal</h1>";
    	global $wp_query;
    if (isset($wp_query->query_vars['productname']))
    {
    echo str_replace("=productname=", $wp_query->query_vars['productname'], "<h1>=productname= Legal</h1>");
    //echo str_replace("=productname=",$wp_query->query_vars['productname'],"This is a =productname= legal document.");
    echo str_replace("=productname=", $wp_query->query_vars['productname'], $content);
    }
    else
    {
    echo "<h1>Error</h1>";
    echo "Please use URl query \"?productname=\" to display this page.";
    }
    }
    
    function register_shortcodes(){
    	add_shortcode('legal-content', 'legal_content_function');
    }
    add_action( 'init', 'register_shortcodes');
    
    ?>

    Thread Starter kjgbriggs

    (@kjgbriggs)

    Bump

    Forum: Fixing WordPress
    In reply to: Out of Memory?
    Thread Starter kjgbriggs

    (@kjgbriggs)

    I tried memory_limit = 256M; just to be safe, but still getting the error.

    Forum: Fixing WordPress
    In reply to: Public File Share
    Thread Starter kjgbriggs

    (@kjgbriggs)

    Anyone?
    Share.Allegorithmic.com is a good example of what I need to be able to do.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    Once the order is processing, yes the page can be accessed.

    But unfortunately I need a much more automated system than manually adding orders to achieve this.

    That is why I thought using products that require a code would work.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    My main issue is centring the product, which is displayed by using the shortcode:

    [product id='{{product_id}}’]

    Encasing it in a div with alignment styles does not place it in the centre of the screen.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    The site is currently local, which is a big issue when trying to get support for my themes etc.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    As the WooCommerce elements were added using a shortcode, and I don’t need anything integrated with WooCommerce, I thought this would be the same as adding php to a regular page (which I don’t know how to do), and it may be, but I can’t find much info on how to do that.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    The accounts page is that “My Account” page from WooCommerce.
    The page has a WooCommerce shortcode in, I was hoping to simply run PHP in the page without having to do any snazzy theme work or anything, but every plugin I have tried doesn’t work.

    The button would be displayed like this:

    <a href="/wp-admin"><input class="primaryButton" type="button" value="Administrator Dashboard"></a>

    I just need a way to do this in the page, only shown to admins, but I would like to avoid doing or using anything too complex.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    Yes, I removed the ID, there seemed to be some ghost styling left over from something.
    It still doesn’t look anything like the dashboard button though.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    The styles are here. I have moved the button to the top and changed its label to “WordPress Button” so I can also look at other options for buttons.

    .button-primary:hover
    {
    background: #0091cd;
        border-color: #0073aa;
        -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,.6);
        box-shadow: inset 0 1px 0 rgba(120,200,230,.6);
        color: #fff;
    }
    
    .button-primary:focus
    {
    border-color: #0e3950;
        -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);
        box-shadow: inset 0 1px 0 rgba(120,200,230,.6),0 0 0 1px #5b9dd9,0 0 2px 1px rgba(30,140,190,.8);
    background: #0091cd;
    }
    Thread Starter kjgbriggs

    (@kjgbriggs)

    The initial styling is correct, it is the active, hover, focus styles I cannot seem to copy no matter what I do, with the code shown above, those suffixes do absolutely nothing, no hover or anything at all.

    I have never had this problem before, with WordPress or any of my .Net sites, this si the first time I have even come across anything like this.

    Thread Starter kjgbriggs

    (@kjgbriggs)

    The body border style works fine.

    The page is an undergoing project, it is located on one of my dev sites here:

    https://dev.areonline.co.uk/code-generator/my-first-code-generator

Viewing 15 replies - 16 through 30 (of 62 total)