Forum Replies Created

Viewing 15 replies - 46 through 60 (of 114 total)
  • If you have FTP access you could try going to wp-content/themes delete (make sure you have a backup) all of those other than the default WP one.

    WP should reset to one of its defaults.

    Ok so its not allowing a span tag in the title, this hack wont work unless you find this code in ‘header.php’ and change to

    <h1 class=”site-title”>

    </h1>

    <h1 class="site-title">
    <a href="http://compacademy.in/" rel="home">COMPUTER ACADEMY <span>Space where your brain catches a pace</span></a></h1>
    </h1>

    This is further down the rabbit hole of a hack/not good practise but should do the trick if you just want it sorted.

    just hit save don’t change anything

    Could try installing wp-supercache plugin
    Also WordFence might be an option to block spam

    Simple simple simple way to do it is create a page for each exercise. Embed the youtube video on each one.

    Then under it manage some hyper links to the next page e.g

    EXERCISE 4
    Video

    <Previous Exercise | Next Exercise >

    Make those hyperlinks to the previous e.g. /exercise-3 and /exercise-5

    Try going to settings > permalinks and just hitting save

    then edit the post get rid of the -2 and save.

    This is a hacky non best practise way to do it and will get overridden if your theme updates its self.

    in the admin of wordpress change the title from: COMPUTER ACADEMY Space where your brain catches a pace

    to

    COMPUTER ACADEMY <span>Space where your brain catches a pace</span>

    then do this

    Load up this file:
    /wp-content/themes/sequential/header.php

    add this before </head>

    <style>
    @media screen and (max-width:1020px) {
    .site-title span{ display:none !important; }
    .site-description{display:none !important;}
    }
    </style>

    Looks like an issue with your theme. Have you tried changing the theme to one of the default wordpress ones e.g. twenty16 can you save a post then?

    Have you also made sure it is not in the bin?

    If that does not work since you are already using inline styling you can try:

    <img src="/wp-content/uploads/Ad.png" alt="associations" style="max-width:100%; height:auto; float:left;" class="size-full wp-image-226" />
    <img src="/wp-content/uploads/Ad2.png" alt="associations" style="max-width:100%; height:auto; float:left;" class="size-full wp-image-226" />

    Hmmm well you could always add an ‘order’ custom field in the post type but i guess its not as elegant.

    You could use a hybrid approach maybe. Let him have the menu then do the above in a more roundabout way:

    $menu = wp_get_nav_menu_items('YOUR MENU');

    print_r that and it gives you an array of post objects you can then just loop over them:

    echo('<ul>');
    foreach($menu as $mk => $mv){
    $meta = get_post_meta($mv->ID);
    echo('<li><a href="' . get_permalink($mv->ID) . '">' . $mv->post_title . '</a></li>');
    }
    echo('</ul>');

    Do you have FTP access?

    If so go to /wp-content/plugins then rename the plugin folder you installed that has caused the issue or delete it entirely.

    Well if its that simple you could just do this:

    <a href="yourcatlink?sa=1">show all</a>

    then in the code do this before the query:

    if($_GET['sa'] == 1){
    $ppp = -1;
    }else{
    $ppp = 2;
    }

    Then instead of:

    $args = array(
             'posts_per_page' => 2,
             'paged' => $paged,
             'cat' => $cat
           );

    have

    `$args = array(
    ‘posts_per_page’ => $ppp,
    ‘paged’ => $paged,
    ‘cat’ => $cat
    );`

    You wanna use pre_get_posts in your functions.php

    function modify_main_query($query) {
    
    	if($query->is_main_query()){ //avoid effecting wp_querys used in temlate
    		$query->query_vars['posts_per_page'] = -1;
    	}
    }
    add_action('pre_get_posts', 'modify_main_query');

    You might need some additional logic on inside the if statement e.g. slap print_r($query); above the if. This will give you a list of object fields where you can cherry pick when this happens.

    if($query->is_main_query()){
    if($query->SOMETHING == SOMETHING){
    		$query->query_vars['posts_per_page'] = -1;
    }
    	}

    The $query->SOMETHING == SOMETHING can be anything you dont need to use the $query object

    Sounds like you just want to loop your post type instead try this code:

    $myquery = array('post_type' => 'YOUR POST TYPE', 'posts_per_page' => -1);
    $mydata = get_posts($myquery);
    
    echo('<ul>');
    foreach($mydata as $dk => $dv){
    $meta = get_post_meta($dv->ID);
    //print_r($meta);
    echo('<li><a href="' . get_permalink($dv->ID) . '">' . $dv->post_title . '</a></li>');
    }
    echo('</ul>');

    This should output your post type with links.

    If you noticed the //print_r if you take out the // it will show all the custom field data for that post.

    So you could add the image in as:

    echo('<li><img src="'.$meta['myimg'].'" /><a href="' . get_permalink($dv->ID) . '">' . $dv->post_title . '</a></li>');

    If might be your image field is a number in which case you want this:

    echo('<li><img src="'.wp_get_attachment_url($meta['myimg']).'" /><a href="' . get_permalink($dv->ID) . '">' . $dv->post_title . '</a></li>');

Viewing 15 replies - 46 through 60 (of 114 total)