Forum Replies Created

Viewing 15 replies - 1 through 15 (of 20 total)
  • Thread Starter dmaeuk

    (@dmaeuk)

    fixed : -)

    <input class="search-blog" type="radio" name="post_type" value="post" checked="checked">
    <label for="search-blog">Coupon</label>
    <input class="search-shop" type="radio" name="post_type" value="product">
    <label for="search-shop">Product</label>
    Thread Starter dmaeuk

    (@dmaeuk)

    HI.

    So i can execute html but not php.

    // DISPLAY MENU
    		if(strlen($MENUCONTENT) > 1){
    		$GLOBALS['flasg_smalldevicemenubar'] = true;
    		$STRING = '<!-- [WLT] FRAMRWORK // MENU -->
    
    		<div class="container-fluid" id="core_smallmenu"><div class="row">
    
    <div style="margin: 0 0 0px 0;
        line-height: 20px;
        font-weight: 100!important;
        width: 100%;
        text-align: center;
        font-family: ubuntu;
        font-size: 14px;
        background: whitesmoke;
        color: #404040;
        padding: 5px;">
        <I CAN EXECUTE HTML HERE BUT NOT PHP>
        </div>
    
    			<div id="wlt_smalldevicemenubar">
    			<a href="javascript:void(0);" class="b1" data-toggle="collapse" data-target=".wlt_smalldevicemenu">'.$CORE->_e(array('mobile','4')).' <span class="glyphicon glyphicon-align-justify"></span></a>
    			 '.wp_nav_menu( array(
    			'container' => 'div',
    			'container_class' => 'wlt_smalldevicemenu collapse',
    			'theme_location' => 'primary',
    			'menu_class' => '',
    			'fallback_cb'     => '',
    			'echo'            => false,
    			'walker' => new Bootstrap_Walker(),
    Thread Starter dmaeuk

    (@dmaeuk)

    it seems that i need to convert all of the php and html elements into strings, which is 100% above my capabilities.

    Thread Starter dmaeuk

    (@dmaeuk)

    Thank you gorakh.sth

    tried this and it broke the site, thank you though.

    Thread Starter dmaeuk

    (@dmaeuk)

    here is a better example of what i mean: I literally need to place this code between these divs

    I have this:

    $topmenustring = '<div id="core_header_navigation" class="hidden-xs">
    	<div class="'.$CORE->CSS("container", true).'">

    What i want to do is this:

    $topmenustring = '<div id="core_header_navigation" class="hidden-xs">
    
    <?php $totalcoupons = wp_count_posts('listing_type')->publish;?>
    We have <strong style="color: #e93030; font-size: 1.3em"><? echo $totalcoupons; ?></strong> blah blah blah <strong style="color: #e93030; font-size: 1.3em"><?php
    $count_posts = wp_count_posts('coupon_type');
    $totalcoupons = $count_posts->publish;
    $taxonomystore = wp_count_terms( 'store' );
    echo $taxonomystore; ?></strong> stores & <strong style="color: #e93030; font-size: 1.3em"><?php
    $count_posts = wp_count_posts('product');
    
    echo number_format("$count_posts->publish");
    ?></strong>
    
    	<div class="'.$CORE->CSS("container", true).'">

    Thread Starter dmaeuk

    (@dmaeuk)

    Thanks Andrew.

    I think thats gone well over my head to be honest.

    I just need to find a way to insert that code, it works on every other php page, just this page it wont work.

    Thread Starter dmaeuk

    (@dmaeuk)

    Hi Andrew.

    What i want to do is add

    <?php $totalcoupons = wp_count_posts('listing_type')->publish;?>
    We have <strong style="color: #e93030; font-size: 1.3em"><? echo $totalcoupons; ?></strong> blah blah blah <strong style="color: #e93030; font-size: 1.3em"><?php
    $count_posts = wp_count_posts('coupon_type');
    $totalcoupons = $count_posts->publish;
    $taxonomystore = wp_count_terms( 'store' );
    echo $taxonomystore; ?></strong> stores & <strong style="color: #e93030; font-size: 1.3em"><?php
    $count_posts = wp_count_posts('product');
    echo number_format("$count_posts->publish");
    ?></strong>

    Into the file that i know nothing about, lol im seriously not a coder, im a dabbler and editor.

    Normally the file consists of writable php but this one does not, i was hoping i could add this code in by escaping this somehow, im not really sure how to explain it

    Thread Starter dmaeuk

    (@dmaeuk)

    AGHH YES!!

    Thank you very much michael this will come in handy on other projects.

    Appreciate your time.

    Thread Starter dmaeuk

    (@dmaeuk)

    SOLVED!!!!!!!!!! Worked it out

    <?php
    $count_posts = wp_count_posts('product');
    echo number_format("$count_posts->publish");
    ?>
    Thread Starter dmaeuk

    (@dmaeuk)

    Wow i can not believe i missed that!

    Thank you Ov3rfly!!!! Appreciate your keen eye! ??

    Thread Starter dmaeuk

    (@dmaeuk)

    Thread Starter dmaeuk

    (@dmaeuk)

    Yes i am fully aware of the documentation thank you through for your kind help.

    The problem is that this does not work at all for your name!

    In fact, this only works for textarea-369 and no other fields.

    How did you do this?

    My field just says [empty] but i want it to say 0

    I worked this out

    replaced

    $image_path = WP_PLUGIN_URL . "/" . plugin_basename( dirname( dirname( __FILE__ ) ) ) . '/assets/images/paypal.png';

    with

    $image_path = plugins_url('', __FILE__) . '/images/paypal.png';

    moved the images folder which is in /assets/images into /classes

    Works fine!

    Is there any chance you can simply paste the code?

    $image_path = WP_PLUGIN_URL . "/" . plugin_basename( dirname( dirname( __FILE__ ) ) ) . '/assets/images/paypal.png';

    I need this to read https not just http, how can this be achieved?

Viewing 15 replies - 1 through 15 (of 20 total)